diff --git a/lib/resources/oidc.js b/lib/resources/oidc.js index 027a0cfba..87ee79b4c 100644 --- a/lib/resources/oidc.js +++ b/lib/resources/oidc.js @@ -110,7 +110,7 @@ module.exports = (service, endpoint) => { // // [1]: https://developers.onelogin.com/openid-connect/guides/email-verified // [2]: https://learn.microsoft.com/en-us/answers/questions/812672/microsoft-openid-connect-getting-verified-email - if(!config.has('default.oidc.allowUnverifiedEmail') && !config.get('default.oidc.allowUnverifiedEmail') && !email_verified) { + if(!(config.has('default.oidc.allowUnverifiedEmail') || !config.get('default.oidc.allowUnverifiedEmail')) && !email_verified) { return emailNotVerified(res, userinfo); }