Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to have unique emails with python social auth

I'm using Python Social Auth (Django) with Google and Facebook and it creates different users with the same email. How do I fix that?

If I log first with Google, logout, and then with Facebook, it must just associate the accounts and not create.

like image 343
Juliana Avatar asked Oct 09 '13 13:10

Juliana


1 Answers

After some code reading I found this in the pipeline:

'social.pipeline.social_auth.associate_by_email',

So, I just added it before

'social.pipeline.user.get_username',

And it worked.

like image 181
Juliana Avatar answered Oct 17 '22 14:10

Juliana