Google-Oauth2 not saving email address

65 views
Skip to first unread message

Kim Vogt

unread,
Feb 21, 2014, 1:59:48 PM2/21/14
to django-so...@googlegroups.com
I haven't upgraded to python-social-auth yet, but I'm trying to get google oauth2 working. I'm calling "do_auth" with an access token with the GoogleOAuth2Backend. It creates the user, but doesn't fill in the email address. Any ideas?

-Kim

Alexander Todorov

unread,
Aug 4, 2014, 8:38:52 AM8/4/14
to django-so...@googlegroups.com
Hi Kim,
I have in my settings.py:

GOOGLE_OAUTH2_EXTENDED_PERMISSIONS = ['email']


and my pipeline is:

SOCIAL_AUTH_PIPELINE = (
    'social_auth.backends.pipeline.social.social_auth_user',
    'social_auth.backends.pipeline.user.get_username',
    'social_auth.backends.pipeline.user.create_user',
    'social_auth.backends.pipeline.social.associate_user',
    'social_auth.backends.pipeline.social.load_extra_data',
    'social_auth.backends.pipeline.user.update_user_details',
)

Either the permissions are not correct or you probably need the last 2 entries in the pipeline.

Also note that create_user should also be able to save the email to the DB.


Reply all
Reply to author
Forward
0 new messages