social-core icon indicating copy to clipboard operation
social-core copied to clipboard

Linkedin OAuth dont work due new Linkedin scopes.

Open arielespinosa opened this issue 8 months ago • 1 comments

Expected behaviour

User can login with Linkedin using OAuth2

Actual behaviour

Got an error due Linkedin scopes

What are the steps to reproduce this issue?

  1. Setup the Django app as documentation.
  2. Linkedin -> ref to login with Linkedin
  3. url path: path('social-auth/', include('social_django.urls', namespace='social')),

Any logs, error output, etc?

Authentication failed: Scope "r_liteprofile" is not authorized for your application

Any other comments?

The issue is due DEFAULT_SCOPE = ["r_liteprofile"] in LinkedinOAuth2 backend class. As soon you remove de defaul value, it's works. Guess the best is use new default values, but, if user define SOCIAL_AUTH_LINKEDIN_OAUTH2_SCOPE settings's var, change DEFAULT_SCOPE value.

arielespinosa avatar Jun 18 '24 17:06 arielespinosa