Open pbeneteau opened 2 years ago
For Facebook this is what I have:
SOCIAL_AUTH_FACEBOOK_EXTRA_DATA = [ ('name', 'name'), ('email', 'email'), ('picture', 'picture'), ('link', 'profile_url'), ] SOCIAL_AUTH_FACEBOOK_SCOPE = ['email'] SOCIAL_AUTH_FACEBOOK_PROFILE_EXTRA_PARAMS = {'fields': 'id, name, email, age_range',}
Not sure if that will solve your issue but I haven't had issues yet. Not a contributor to PSA but hopefully that helps.
I reckon you were able to solve this issue? I wasn't able to reproduce it but either way you'd have to enforce the email requirement if that is a must.
For Facebook this is what I have:
SOCIAL_AUTH_FACEBOOK_EXTRA_DATA = [ ('name', 'name'), ('email', 'email'), ('picture', 'picture'), ('link', 'profile_url'), ] SOCIAL_AUTH_FACEBOOK_SCOPE = ['email'] SOCIAL_AUTH_FACEBOOK_PROFILE_EXTRA_PARAMS = {'fields': 'id, name, email, age_range',}
Not sure if that will solve your issue but I haven't had issues yet. Not a contributor to PSA but hopefully that helps.
That solved my problem, thanks for share!
Would you mind updating the documentation with this? See https://python-social-auth.readthedocs.io/en/latest/backends/facebook.html
I'm login on Facebook using their SDK on my frontend.
My scopes:
SOCIAL_AUTH_FACEBOOK_SCOPE = ['public_profile', 'email']
The email is requested when the user accept information permission during login process. But when I exchange the access_token using Django social auth, the email isn't included in the data. I only have the username and id.
When I check on my Facebook account settings, after a login, I can see that my email has been provided to the app.