I'm trying to figure out the best way to pull in a social email when a user signs up through a social account (I'm using Facebook and Google). Ideally it would be great if the email pulled into the User instance when the user signed up, similar to how first name and last name are pulled in. Is it possible for django-allauth do that?
The other option that I would do next is to use the Facebook/Google APIs to get the email from the user since the id is stored in user.extra_data
Anyone know if django-allauth can pull in social emails, or have any other ideas on how to bring in the social email?
Check out the SOCIALACCOUNT_EMAIL_REQUIRED
setting. Setting that to True
, along with requesting the relevant permission from the social provider (e.g. email
for Facebook), should work.