social-core
social-core copied to clipboard
Auth0 OAuth 2: Unable to get id_token
Expected behaviour
I'm using the Auth0 OAuth2 backend. When I log in with a user account, the social-core pipeline should get a response containing an id_token along with the access token.
Actual behaviour
After logging in, I get an error during Auth0OAuth2.get_user_details() at jwt.decode():
DecodeError at /complete/auth0/: Invalid token type. Token must be a <class 'bytes'>.
This seems to happen because the response doesn't contain an id_token (it only has access_token, expires_at, and token_type).
What are the steps to reproduce this issue?
I'm implementing this in Django using social-app-django. My Auth0 app is a Regular Web App on a developer account, and changing the app's grant types and authentication method hasn't fixed the error. I have the following environment variables set:
SOCIAL_AUTH_AUTH0_KEY
SOCIAL_AUTH_AUTH0_SECRET
SOCIAL_AUTH_AUTH0_DOMAIN
To reproduce, implement the Auth0OAuth2 backend with the above settings, and log in with a user account.
Any other comments?
The docs have no documentation yet for setting up the Auth0 backend, so I'm not sure if there's an environment variable I'm missing. Any guidance on the proper setup would be greatly appreciated!