Reputation: 857
I configured the login with google in a Django project. I'm able to get the name and last name but the user is saved with an empty email. I configured the scope in this way:
SOCIAL_AUTH_GOOGLE_OAUTH2_SCOPE = [
'profile',
'email'
]
But the email continues saving as "". Am I writing the scopes in bad way?
Upvotes: 0
Views: 1687
Reputation: 101
Try this
SOCIAL_AUTH_GOOGLE_OAUTH2_SCOPE = [
'https://www.googleapis.com/auth/userinfo.email',
'https://www.googleapis.com/auth/userinfo.profile'
]
it will collect user email and profile name store it into USER
model.
Upvotes: 2