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

Error getting user email from external provider only with public Azure /consumers/ tenant #1549

Open
2 tasks done
automaton82 opened this issue Apr 21, 2024 · 0 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@automaton82
Copy link

automaton82 commented Apr 21, 2024

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

When using oauth with Azure and the personal accounts only tenant, the oauth call does not work and the error Error getting user email from external provider happens everytime.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Setup an oauth call with MSFT. When you set it up, ensure your app registration is Personal accounts only
  2. As per supabase documentation and microsoft's, use https://login.microsoftonline.com/consumers/ as the tenant URL
  3. Ensure email is added in the scope as per the docs, like:
async function signInWithAzure() {
  const { data, error } = await supabase.auth.signInWithOAuth({
    provider: 'azure',
    options: {
      scopes: 'email',
    },
  })
}

Expected behavior

This should work

System information

  • OS: Windows and hosted
  • Browser all
  • Version of supabase-js: 2.39.3
  • Version of Node.js: 20.12.2

Additional context

This appears similar to #550 but in that issue people said personal accounts worked fine, it was /common/ that did not. Now it seems the opposite

@automaton82 automaton82 added the bug Something isn't working label Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant