Skip to content

Commit 75dc42c

Browse files
Allow OAuth 2 login using the username claim if the email is absent from the user profile. #8652
1 parent ec3d142 commit 75dc42c

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

web/pgadmin/authenticate/oauth2.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,6 @@ def login(self, form):
166166
]
167167
email = profile_dict[email_key[0]] if (len(email_key) > 0) else None
168168

169-
if not email:
170-
error_msg = "No email found in profile data."
171-
current_app.logger.exception(error_msg)
172-
return False, gettext(error_msg)
173-
174169
username = email
175170
username_claim = None
176171
if 'OAUTH2_USERNAME_CLAIM' in self.oauth2_config[

0 commit comments

Comments
 (0)