Skip to content

Commit

Permalink
fix: linkedin_oidc provider error (supabase#1534)
Browse files Browse the repository at this point in the history
## What kind of change does this PR introduce?

Fixes supabase#1533

## What is the current behavior?

Attempting to signInWithOAuth with linkedin_iodc provider results in
error 500

## What is the new behavior?

Attempting to signInWithOAuth with linkedin_iodc results in a successful
login

## Additional context

Error from Supabase Auth Logs:
`oidc: id token issued by a different provider, expected
\"https://www.linkedin.com\" got \"https://www.linkedin.com/oauth\"`
  • Loading branch information
omerhochman authored Apr 15, 2024
1 parent e4f2b59 commit 4f5e8e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/api/provider/linkedin_oidc.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func NewLinkedinOIDCProvider(ext conf.OAuthProviderConfiguration, scopes string)
// Linkedin uses a different issuer from it's oidc discovery url
// https://learn.microsoft.com/en-us/linkedin/consumer/integrations/self-serve/sign-in-with-linkedin-v2#validating-id-tokens
ctx := oidc.InsecureIssuerURLContext(context.Background(), IssuerLinkedin)
oidcProvider, err := oidc.NewProvider(ctx, IssuerLinkedin+"/oauth")
oidcProvider, err := oidc.NewProvider(ctx, IssuerLinkedin)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 4f5e8e5

Please sign in to comment.