10

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.

Daniel Widdis
  • 8,424
  • 13
  • 41
  • 63
Juliana
  • 578
  • 7
  • 18

1 Answers1

17

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.

Juliana
  • 578
  • 7
  • 18
  • 9
    Note to readers: there's a documented privacy concern here, which is why the default setting is off. In short: you're depending on the security of email validation at each of the third party auth providers. – Bryce Nov 22 '13 at 09:15
  • Do you have to be logged in? It seems if you are not logged in, it creates a new account. – Val Neekman Apr 01 '14 at 03:56