Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting a new user's Twitter email address with Django and django-allauth

I'm using the latest version of django-allauth and Django 1.8.

I have a custom user model which requires an email address.

When somebody creates a new user by connecting their Twitter account, they are (after a successful OAuth connection) asked for their email address by allauth.

Allauth has no issue with Facebook or Google.

I briefly explored adding email prefill to my custom adapter (a few small changes to DefaultSocialAccountAdapter), but the user's email address isn't even in extra_data.

Does Twitter purposely not allow you to get a user's email address? It really breaks the flow of my application, as it requires the user to confirm their email address, which is half the point of using social logins in the first place!

Thanks.

like image 548
Kye Russell Avatar asked Nov 26 '25 13:11

Kye Russell


1 Answers

I think before you doing with django-allauth you may need to look at this verify_credentials.

And also you have to fill the form and get the approval from Twitter.

like image 195
Raja Simon Avatar answered Nov 28 '25 02:11

Raja Simon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!