social-core
social-core copied to clipboard
Linkedin OAuth dont work due new Linkedin scopes.
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?
- Setup the Django app as documentation.
- Linkedin -> ref to login with Linkedin
- 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.