Fredrik Ekre
2 days ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
7 additions and
0 deletions
-
src/api/identity.rs
|
|
|
@ -362,6 +362,13 @@ async fn sso_login( |
|
|
|
user.name = user_name.clone(); |
|
|
|
} |
|
|
|
|
|
|
|
user.save(conn).await?; |
|
|
|
} else if user.verified_at.is_none() |
|
|
|
&& user.email == user_infos.email |
|
|
|
&& user_infos.email_verified.unwrap_or(CONFIG.sso_allow_unknown_email_verification()) |
|
|
|
{ |
|
|
|
// The email verification is handled by the provider, backfill for accounts created before SSO
|
|
|
|
user.verified_at = Some(now); |
|
|
|
user.save(conn).await?; |
|
|
|
} |
|
|
|
|
|
|
|
|