mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-03-03 22:49:42 +00:00
Require email_verified to be explicitly true when enforcement is enabled
Previously the check only rejected email_verified === false, allowing logins when the claim was missing entirely. Since the admin opted in, the IdP is expected to provide the claim.
This commit is contained in:
parent
b3d63f4158
commit
49aeb2da19
2 changed files with 9 additions and 7 deletions
|
|
@ -168,7 +168,7 @@ class OidcAuthStrategy {
|
|||
}
|
||||
|
||||
// Enforce email_verified check on every login if configured
|
||||
if (global.ServerSettings.authOpenIDRequireVerifiedEmail && userinfo.email_verified === false) {
|
||||
if (global.ServerSettings.authOpenIDRequireVerifiedEmail && userinfo.email_verified !== true) {
|
||||
throw new AuthError('Email is not verified', 401)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue