From 75dc42cf24979a3ef3a49fab2bef259de911b3b8 Mon Sep 17 00:00:00 2001 From: Yogesh Mahajan Date: Wed, 23 Apr 2025 15:21:25 +0530 Subject: [PATCH] Allow OAuth 2 login using the username claim if the email is absent from the user profile. #8652 --- web/pgadmin/authenticate/oauth2.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/web/pgadmin/authenticate/oauth2.py b/web/pgadmin/authenticate/oauth2.py index bda2c4058..b43491190 100644 --- a/web/pgadmin/authenticate/oauth2.py +++ b/web/pgadmin/authenticate/oauth2.py @@ -166,11 +166,6 @@ class OAuth2Authentication(BaseAuthentication): ] email = profile_dict[email_key[0]] if (len(email_key) > 0) else None - if not email: - error_msg = "No email found in profile data." - current_app.logger.exception(error_msg) - return False, gettext(error_msg) - username = email username_claim = None if 'OAUTH2_USERNAME_CLAIM' in self.oauth2_config[