make oidc check if email verification is required

This commit is contained in:
Drake
2026-07-31 11:09:33 -05:00
parent 8ba2d81297
commit 1801150ad4
@@ -2773,7 +2773,8 @@ impl AuthApplicationService {
}; };
let provider_name = oidc.provider_name().to_string(); let provider_name = oidc.provider_name().to_string();
// Check email_verified - only if email is present in claims // Check email_verified - only if email is present in claims, and email verification is required.
if self.require_verified_email() {
if let Some(email) = &claims.email { if let Some(email) = &claims.email {
let verified = claims.email_verified.unwrap_or(false); let verified = claims.email_verified.unwrap_or(false);
if !verified { if !verified {
@@ -2789,6 +2790,7 @@ impl AuthApplicationService {
)); ));
} }
} }
}
// 4. Determine username and email // 4. Determine username and email
let oidc_username = claims let oidc_username = claims