Allow OAuth 2 login using the username claim if the email is absent from the user profile. #8652

pull/8686/head
Yogesh Mahajan 2025-04-23 15:21:25 +05:30 committed by GitHub
parent ec3d142ad9
commit 75dc42cf24
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 5 deletions

View File

@ -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[