Linkedin scopes are changed
RealMrHex opened this issue · comments
Socialite Version
5.x [Latest]
Laravel Version
10.x [Latest]
PHP Version
8.2
Database Driver & Version
MYSQL
Description
Current State:
The recent changes in LinkedIn OAuth scopes have rendered the r_liteprofile and r_emailaddress scopes unauthorized. These scopes are no longer valid for authentication.
Proposed Solution:
To address this issue, the Laravel Socialite package needs to be updated to reflect the changes in LinkedIn's OAuth scopes. Instead of using r_liteprofile and r_emailaddress, the new scopes openid, profile, and email should be adopted, following the guidelines provided in the LinkedIn documentation.
Reference:
LinkedIn OAuth scope changes: LinkedIn Developer Documentation
Screenshot:
This adjustment is necessary to ensure that Laravel applications can seamlessly integrate with the updated LinkedIn OAuth scopes and provide users with a smooth and secure authentication experience.
Contributors and maintainers of the Laravel Socialite package are kindly requested to review and implement this necessary update to ensure the compatibility of the package with LinkedIn's revised OAuth scope structure.
Your attention to this matter is greatly appreciated.
Thank you.
Steps To Reproduce
LinkedIn OAuth Scope Update for Laravel Socialite
Implementation Suggestion:
To address the issue of LinkedIn OAuth scope changes in the Laravel Socialite package, the following steps are recommended for the maintainers:
-
Update Default Scopes:
Locate the
LinkedInProvider.php
file in the Laravel Socialite package, specifically at the path:\Laravel\Socialite\Two\LinkedInProvider.php
. -
Update Scopes Array:
In the
LinkedInProvider
class, find the$scopes
array. This array defines the default scopes that are used for LinkedIn OAuth authentication. Modify the array as follows:protected $scopes = ['openid', 'profile', 'email'];
Replace the previous scopes r_liteprofile
and r_emailaddress
with the new scopes openid
, profile
, and email
as outlined in the LinkedIn documentation.
Regards.
Could you please create a pull request for this with the change you believe is more appropriate? Thank you!
Could you please create a pull request for this with the change you believe is more appropriate? Thank you!
OFC.
@nunomaduro Solved in #651
Great. Lets follow your issue on the pull request now.