From 116bf9fd4d61b7062862bc4c01e6065ca251a4e4 Mon Sep 17 00:00:00 2001 From: Eugene Date: Tue, 10 Sep 2024 22:31:24 +0200 Subject: [PATCH] fixed SSO authentication getting incorrectly rejected when user has both an "any provider" and a provider specific SSO credential --- warpgate-core/src/config_providers/db.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/warpgate-core/src/config_providers/db.rs b/warpgate-core/src/config_providers/db.rs index 7b98d14..6e6248e 100644 --- a/warpgate-core/src/config_providers/db.rs +++ b/warpgate-core/src/config_providers/db.rs @@ -237,8 +237,10 @@ impl ConfigProvider for DatabaseConfigProvider { ref email, }) = credential { - if provider.as_ref().unwrap_or(client_provider) == client_provider { - return Ok(email == client_email); + if provider.as_ref().unwrap_or(client_provider) == client_provider + && email == client_email + { + return Ok(true); } } }