Skip to content

Commit

Permalink
Add openid to the list of allowed login methods
Browse files Browse the repository at this point in the history
  • Loading branch information
twk3 committed Dec 13, 2024
1 parent df7ac96 commit 1188aa7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/account-db.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,12 @@ export function getLoginMethod(req) {
return req.body.loginMethod;
}

const activeMethod = getActiveLoginMethod();
if (config.loginMethod) {
return config.loginMethod;
}

return config.loginMethod || activeMethod || 'password';
const activeMethod = getActiveLoginMethod();
return activeMethod || 'password';
}

export async function bootstrap(loginSettings) {
Expand Down
2 changes: 1 addition & 1 deletion src/load-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ if (process.env.ACTUAL_CONFIG_PATH) {
/** @type {Omit<import('./config-types.js').Config, 'mode' | 'dataDir' | 'serverFiles' | 'userFiles'>} */
let defaultConfig = {
loginMethod: 'password',
allowedLoginMethods: ['password', 'header'],
allowedLoginMethods: ['password', 'header', 'openid'],
// assume local networks are trusted
trustedProxies: [
'10.0.0.0/8',
Expand Down

0 comments on commit 1188aa7

Please sign in to comment.