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

fix: azure not providing email claim with custom tenant url #1399

Closed
wants to merge 1 commit into from

Conversation

hmnd
Copy link

@hmnd hmnd commented Feb 5, 2024

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

The email claim is not returned when using a custom tenant URL, eg. https://login.microsoftonline.com/c2d53323-1e4f-4f73-ae1e-63ba1aff706b

This would result in an error like Error getting user email from external provider.

Fixes #550, #292

What is the new behavior?

The email is now returned and auth is successful.

Additional context

After a whole bunch of debugging, turns out Azure just needed an explicit email scope to be included in the request.

Edit: totally missed this somehow, but I think it makes more sense for this scope to always be requested rather than leaving that to the user.

@hmnd hmnd requested a review from a team as a code owner February 5, 2024 22:49
@hf
Copy link
Contributor

hf commented Feb 6, 2024

Edit: totally missed #550 (comment) somehow, but I think it makes more sense for this scope to always be requested rather than leaving that to the user.

We prefer if this remains in the client code. We're working hard to remove the dependence on email addresses so this goes against that strategy.

Please feel free to contribute again in the future!

@hf hf closed this Feb 6, 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
2 participants