diff --git a/src/accounts/openid.js b/src/accounts/openid.js index c71917b5f..62fd46c55 100644 --- a/src/accounts/openid.js +++ b/src/accounts/openid.js @@ -285,7 +285,8 @@ export function isValidRedirectUrl(url) { const redirectUrl = new URL(url); const serverUrl = new URL(serverHostname); - if (redirectUrl.hostname === serverUrl.hostname) { + // Compare origin (protocol + hostname + port) + if (redirectUrl.origin === serverUrl.origin) { return true; } else { return false;