Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lelemm committed Nov 25, 2024
1 parent 1e449c9 commit bddab0c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/account-db.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ export function getLoginMethod(req) {
return req.body.loginMethod;
}

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

return config.loginMethod || activeMethod || 'password';
}

export async function bootstrap(loginSettings) {
Expand Down
3 changes: 1 addition & 2 deletions src/accounts/openid.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,7 @@ export function isValidRedirectUrl(url) {
const redirectUrl = new URL(url);
const serverUrl = new URL(serverHostname);

// Compare origin (protocol + hostname + port)
if (redirectUrl.origin === serverUrl.origin) {
if (redirectUrl.hostname === serverUrl.hostname) {
return true;
} else {
return false;
Expand Down

0 comments on commit bddab0c

Please sign in to comment.