fixed SSO authentication getting incorrectly rejected when user has both an "any provider" and a provider specific SSO credential

This commit is contained in:
Eugene 2024-09-10 22:31:24 +02:00
parent 41b319d931
commit 116bf9fd4d
No known key found for this signature in database
GPG key ID: 5896FCBBDD1CF4F4

View file

@ -237,8 +237,10 @@ impl ConfigProvider for DatabaseConfigProvider {
ref email, ref email,
}) = credential }) = credential
{ {
if provider.as_ref().unwrap_or(client_provider) == client_provider { if provider.as_ref().unwrap_or(client_provider) == client_provider
return Ok(email == client_email); && email == client_email
{
return Ok(true);
} }
} }
} }