Answer the question
In order to leave comments, you need to log in
How to get a response from the social. networks using django-social-auth?
Good day. How to intercept the response of the social. networks using django-social-auth?
After authorization on the site through the social. the network is created by a user model in the admin panel, but it became necessary to save, in addition to username, also email and profile picture. Can you please tell me how can I get the social-auth response immediately after login?
Thanks a lot.
Answer the question
In order to leave comments, you need to log in
All social networks are different, email can be done like this
settings.py
SOCIAL_AUTH_GOOGLE_OAUTH2_SCOPE = [
'https://www.googleapis.com/auth/userinfo.email',
'https://www.googleapis.com/auth/userinfo.profile'
]
SOCIAL_AUTH_VK_OAUTH2_SCOPE = ['email']
SOCIAL_AUTH_TWITTER_SCOPE = ['email']
SOCIAL_AUTH_FACEBOOK_SCOPE = ['email']
SOCIAL_AUTH_PIPELINE = (
...
'apps.accounts.social.save_avatar', # это твоя кастомная функция
...
)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question