I am developing a Django web app using python-social-auth. I have this in my Django settings:
SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = 'xxx'
SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = 'xxx'
SOCIAL_AUTH_FACEBOOK_KEY = 'xxx'
SOCIAL_AUTH_FACEBOOK_SECRET = 'xxx'
SOCIAL_AUTH_FACEBOOK_SCOPE = ['email',]
SOCIAL_AUTH_LINKEDIN_OAUTH2_KEY = 'xxx'
SOCIAL_AUTH_LINKEDIN_OAUTH2_SECRET = 'xxx'
SOCIAL_AUTH_LINKEDIN_OAUTH2_SCOPE = ['r_basicprofile', 'r_emailaddress']
Now Google sets user's email just fine in auth.user model in database, but LinkedIn and Facebook won't even send the user's email. What do I do?
Add this to your settings:
Now Facebook and LinkedIn will send user's email and python-social-auth will automatically set them to User model in the database.
Hope this helps someone.