laravel / socialite

Laravel wrapper around OAuth 1 & OAuth 2 libraries.

Home Page:https://laravel.com/docs/socialite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Linkedin] 'profile' and 'email' should be used as scopes[As Linkedin changed it] instead of 'r_liteprofile', 'r_emailaddress'.

akhterarif opened this issue · comments

Socialite Version

5.10

Laravel Version

10.x

PHP Version

8.2

Database Driver & Version

No response

Description

As Linkedin has changed the scopes name from 'r_liteprofile' and 'r_emailaddress' to 'profile' and 'email'. The Linkedin authentication is not working properly. If it is changed to new one. It works perfectly.

Steps To Reproduce

  1. If you keep the 'r_liteprofile' and 'r_emailaddress' as it is in the /src/Two/LinkedinProvider.php it will show the error while logging in linkedin
    error=unauthorized_scope_error&error_description=Scope "r_liteprofile" is not authorized for your application
  2. Then change
protected $scopes = ['profile', 'email'];

It works like charm. As Linkedin has changed their scopes names. So we need to do that as well.