Closed Paradoxis closed 7 years ago
You need to override the backend in use, let's assume Facebook OAuth2
, the following override should be what you are looking for:
from social_core.backends.facebook import FacebookOAuth2
class FacebookOAuth2Token(FacebookOAuth2):
name = 'facebook-token'
RESPONSE_TYPE = 'token'
Add that backend to the AUTHENTICATION_BACKENDS
setting and use the url /login/facebook-token
.
I'm writing a mobile app that requires a login using
response_type=token
instead of the defaultresponse_type=code
, is there a way how I can set up my social login redirect link to use the token based login instead? I know it's possible to register using an access token (docs), but I can't seem to find out how I can append this to the URL before the user is redirected.