Skip to content
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

feat: fix azure tenant login #1486

Closed

Conversation

alexleetc28
Copy link

What kind of change does this PR introduce?

Bug fix: Currently, Azure tenant users cannot log in due to Error getting user email from external provider.

What is the current behavior?

The reason, as noted in #1269, is that Azure login has been changed to use id_token instead of calling the /oidc/userinfo endpoint in GetUserData(). However, when signing in to an Azure tenant, the returned id_token does not contain an email or UPN, which causes the above error.
#550

What is the new behavior?

Use the /oidc/userinfo endpoint instead of id_token when the user is not using defaultAzureAPIBase.

@alexleetc28 alexleetc28 requested a review from a team as a code owner March 17, 2024 16:38
@alexleetc28 alexleetc28 changed the title bugfix: fix azure tenant login feat: fix azure tenant login Mar 17, 2024
@hf
Copy link
Contributor

hf commented Mar 18, 2024

Azure Entra / Active Directory has a severe security vulnerability with the /oidc/userinfo endpoint. It was reported to Microsoft by this team as VULN-110722 and the response from Microsoft was:

Our team investigated this report and determined it to be as intended by design. The relevant product team has been notified to scrutinize the documentation and make updates for improved clarity, if necessary.

Meaning that Supabase Auth cannot use the User Info endpoint at this time.

Thank you for trying to fix the issue!

More info here: https://supabase.com/docs/guides/auth/social-login/auth-azure#guarding-against-unverified-email-domains

@hf hf closed this Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants