SocialiteProviders / Providers

A Collection of Providers for Laravel Socialite
https://socialiteproviders.com
MIT License
506 stars 445 forks source link

docs: update linkdin provider documentation #1201

Closed TilsonM17 closed 4 months ago

TilsonM17 commented 6 months ago

Recently I had an error when trying to do Sig In, the reason is that Linkdin changed the way it authenticates, and the package is already that way.

The old way to connect with provider givem error, because now LinkedIn is using Sign In with LinkedIn using OpenID Connect instead of Sign In with LinkedIn.

So you just need to use linkedin-openid instead of linkedin in the service.php and Socialite::driver('linkedin-openid')->redirect();

atymic commented 5 months ago

Are you sure this is correct? https://github.com/SocialiteProviders/Providers/blob/master/src/LinkedIn/LinkedInExtendSocialite.php

atymic commented 4 months ago

Closing due to inactivity

quantumwebco commented 3 months ago

Are you sure this is correct? https://github.com/SocialiteProviders/Providers/blob/master/src/LinkedIn/LinkedInExtendSocialite.php

@atymic I can confirm this is correct. Been struggling getting linkedin to work due to the package using the deprecated API and scopes. Using 'linkedin-openid' as the provider name and config fixed it and now it's working as expected

quantumwebco commented 3 months ago

Digging around more in relation to this, it is really confusing with the issues and PRs. I think it should state in the docs that using 'linkedin' will not work, maybe it works for legacy, but as far as I know they have deprecated it completely now, so you have to use 'linkedin-openid'

atymic commented 3 months ago

Could you PR an update to the docs? And then i can deprecate the old one.

quantumwebco commented 3 months ago

This PR literally does that but you closed it

atymic commented 3 months ago

It's not our provider, is what I mean. you're using the base socialite provider if you use that https://github.com/laravel/socialite/blob/1e177bf35a644db34c207b44d752c0d8e8d7c004/src/Two/LinkedInOpenIdProvider.php

TilsonM17 commented 3 months ago

@atymic

The Linkedin current use v2 for they api, and only accept openID con sign in in API.

Try to create a new project and try sign-in with current instructions in docs. You will get an error.

Socialite package are correct they're implementing with new way, the right way . The only problem is docs. Docs need update. And this PR does exactly this.

https://learn.microsoft.com/en-us/linkedin/consumer/integrations/self-serve/sign-in-with-linkedin-v2

quantumwebco commented 3 months ago

The Linkedin driver in this package is deprecated then, completely defunct, and should be removed from the docs entirely, right? Or is it better to leave the page there but refer back to the core documentation of using 'linkedin-openid', as per https://laravel.com/docs/11.x/socialite#configuration?