Skip to content

Allow OAuth2 login using the username claim if the email is missing from the user profile.#8652 #8683

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 23, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions web/pgadmin/authenticate/oauth2.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,6 @@ def login(self, form):
]
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[
Expand Down
Loading