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: use OIDC ID token for Azure #1269

Merged
merged 2 commits into from
Oct 16, 2023
Merged

feat: use OIDC ID token for Azure #1269

merged 2 commits into from
Oct 16, 2023

Conversation

hf
Copy link
Contributor

@hf hf commented Oct 12, 2023

Use the OIDC ID token instead of the UserInfo endpoint, as there are serious discrepancies between what is returned.

internal/api/provider/provider.go Outdated Show resolved Hide resolved
internal/api/provider/azure.go Outdated Show resolved Hide resolved
internal/api/provider/oidc.go Outdated Show resolved Hide resolved
internal/api/provider/oidc.go Show resolved Hide resolved
internal/api/provider/azure.go Show resolved Hide resolved
internal/api/provider/oidc.go Show resolved Hide resolved
@hf hf force-pushed the hf/azure-id-token branch 2 times, most recently from 5d4df88 to 608284c Compare October 13, 2023 08:15
internal/api/provider/oidc.go Show resolved Hide resolved
internal/api/provider/oidc.go Outdated Show resolved Hide resolved
internal/api/provider/oidc.go Outdated Show resolved Hide resolved
@hf hf marked this pull request as ready for review October 13, 2023 16:54
@hf hf requested a review from a team as a code owner October 13, 2023 16:54
@hf hf force-pushed the hf/azure-id-token branch 4 times, most recently from 582d93b to c28cbca Compare October 14, 2023 11:12
internal/api/provider/azure.go Outdated Show resolved Hide resolved
internal/api/provider/azure.go Show resolved Hide resolved
internal/api/provider/azure.go Outdated Show resolved Hide resolved
internal/api/provider/azure.go Outdated Show resolved Hide resolved
@hf hf force-pushed the hf/azure-id-token branch 13 times, most recently from fdeeb99 to 74b58c6 Compare October 15, 2023 22:47
@hf hf force-pushed the hf/azure-id-token branch 5 times, most recently from fed3540 to e9b120d Compare October 16, 2023 00:31
Copy link
Contributor

@J0 J0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for putting this together.

The test secrets might show up under security issues after this is merged so we should probably remember to circle back and mark them.

@hf hf force-pushed the hf/azure-id-token branch 8 times, most recently from b13f7d5 to c337005 Compare October 16, 2023 09:06
Co-authored-by: Joel Lee <[email protected]>
@hf hf merged commit 57e336e into master Oct 16, 2023
2 checks passed
@hf hf deleted the hf/azure-id-token branch October 16, 2023 10:34
@github-actions
Copy link
Contributor

🎉 This PR is included in version 2.102.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

hoeseong19 pushed a commit to hoeseong19/gotrue that referenced this pull request Oct 16, 2023
Use the OIDC ID token instead of the UserInfo endpoint, as there are
serious discrepancies between what is returned.

---------

Co-authored-by: Joel Lee <[email protected]>
@mosnicholas
Copy link

mosnicholas commented Oct 17, 2023

@hf -- I've started getting the following error for Azure users logging in:

azure: ID token issuer \"https://login.microsoftonline.com/TENANT-UUID/v2.0\" does not match expected issuer \"https://login.microsoftonline.com/organizations/v2.0\"","level":"error","method":"GET","msg":"500: Error getting user email from external provider"

Is this related to this PR? The errors began at the following timestamp: 2023-10-17T08:59:15.000Z. I am using multitenant sign in.

Is the fix here? #1272.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants