wagnerdelima / drf-social-oauth2

drf-social-oauth2 makes it easy to integrate Django social authentication with major OAuth2 providers, i.e., Facebook, Twitter, Google, etc.
https://drf-social-oauth2.readthedocs.io/en/latest/
MIT License
274 stars 34 forks source link

Linkedin cannot convert token #51

Closed shukhrat121995 closed 3 years ago

shukhrat121995 commented 3 years ago

I was able to receive an authorization_code and convert it to access token. However, when I pass it to http://localhost:8000/auth/convert-token/ I got an error { "error": "invalid_request", "error_description": "Backend responded with HTTP403: {\"serviceErrorCode\":100,\"message\":\"Not enough permissions to access: GET /me\",\"status\":403}." }

I passed as a parameter token, backend - linkedin-oauth2, grant_type: convert_token, client_id and client_secret

shukhrat121995 commented 3 years ago

I was able to solve it, just need to pass in fronent scope 'r_liteprofile' while getting authentication code