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

Login with LinkedIn : error 400 #26390

Closed
2 tasks done
Kamsou opened this issue May 16, 2024 · 8 comments
Closed
2 tasks done

Login with LinkedIn : error 400 #26390

Kamsou opened this issue May 16, 2024 · 8 comments
Labels
auth All thing Supabase Auth related bug Something isn't working

Comments

@Kamsou
Copy link

Kamsou commented May 16, 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

I am using the new LinkedIn OIDC sign-in provider and encountering the following error:

{"code":400,"error_code":"validation_failed","msg":"Unsupported provider: provider is not enabled"}

To Reproduce

Call this function in any apps:

    const { data, error } = await supabase.auth.signInWithOAuth({
      provider: 'linkedin',
      options: {
        redirectTo: '${baseUrlSupabase}/auth/v1/callback'
      }
    })

Expected behavior

A redirect to the Linkedin authentication modal

Screenshots

Capture d’écran 2024-05-16 à 17 45 21
Capture d’écran 2024-05-16 à 17 45 13

System information

  • OS: macOS
  • Browser Chrome
  • Version of supabase-js: ^2.31.0
@Kamsou Kamsou added the bug Something isn't working label May 16, 2024
@encima
Copy link
Member

encima commented May 16, 2024

Have you enabled the provider in the Auth settings?

@encima encima added the auth All thing Supabase Auth related label May 16, 2024
@Kamsou
Copy link
Author

Kamsou commented May 17, 2024

@encima Yes
Capture d’écran 2024-05-17 à 09 29 24

@encima
Copy link
Member

encima commented May 17, 2024

Excellent, then your provider should be:
linkedin_oidc

(docs)

@Kamsou
Copy link
Author

Kamsou commented May 17, 2024

I used linkedin because I have a typing error with linkedin_oidc

Unable to assign type '“linkedin_oidc”' to type 'Provider'.ts(2322)
types.d.ts(426, 5): The expected type comes from the 'provider' property, which is declared here on the 'SignInWithOAuthCredentials' type
(property) provider: Provider

But even with linkedin_oidc I get error 400, so I don't think that's where it's coming from..

@encima
Copy link
Member

encima commented May 17, 2024

Thanks for trying! linkedin_oidc is the one to use, we just need to fix your typing error

Please update to the latest version (you are on 2.31 and latest is 2.43).

You may also need to ensure the latest auth-js is being used by your supabase SDK

@Kamsou
Copy link
Author

Kamsou commented May 17, 2024

ok to have moved to 2.43 fixed the typing error, thanks.

ok things are progressing, I'm getting to a linkedin screen. But with a redirect_ui problem:

Capture d’écran 2024-05-17 à 09 53 56

is my redirectTo disturbed?

@encima
Copy link
Member

encima commented May 17, 2024

Nice, it is not disturbed, only the value you send is not matching what was saved in LinkedIn. If you check/update that, then I think you are good to go!

@Kamsou
Copy link
Author

Kamsou commented May 17, 2024

Oh okay yes mybad , "Authorized redirect URLs for your app" was empty

Its works now ! Thanks so much @encima 🫰

@Kamsou Kamsou closed this as completed May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth All thing Supabase Auth related bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants