title: Django allauth social login: automatically linking social site profiles using the registered email
body: <p>I aim to create the <strong>easiest login experience</strong> possible for the users of my Django site. I imagine something like:</p>
  
  <ol>
  <li>Login screen is presented to user</li>
  <li>User selects to login with Facebook or Google</li>
  <li>User enter password in external site</li>
  <li>User can interact with my site as an authenticated user</li>
  </ol>
  
  <p>Ok, this part is easy, just have to install <a href="https://github.com/pennersr/django-allauth" rel="noreferrer">django-allauth</a> and configure it.</p>
  
  <p>But I also want to give the option to use the site with a local user. It would have another step:</p>
  
  <ol>
  <li>Login screen is presented to user</li>
  <li>User selects to register</li>
  <li>User enter credentials</li>
  <li>Site sends a verification email</li>
  <li>User clicks in email link and can interact with my site as an authenticated user</li>
  </ol>
  
  <p>Ok, both the default authentication and allauth can do it. But now is the million dollars question.</p>
  
  <p><strong>If they change how they do the login, how do I <em>automatically</em> associate their Google, FB and local accounts?</strong> </p>
  
  <p>See that any way they login, I have their email address. Is it possible to do it using django-allauth? I know I can do it with <a href="https://stackoverflow.com/questions/13140021/django-allauth-linking-multiple-social-accounts-to-a-single-user/19353632#19353632">user intervention</a>. Today the default behavior is to refuse the login saying that the email is already registered.</p>
  
  <p>If it isn't possible to do just with configuration, I'll accept the answer that gives me some orientation about which modifications should I make in allauth code to support this workflow.</p>
  
  <p>There are a lot of reasons to do this. The users will forget which method they used to authenticate, and will sometimes use Google, sometimes FB and sometimes the local user account. We already have a lot of local user accounts and social accounts will be a new feature. I want the users to maintain their identity. I envision the possibility to ask for the user friends list, so if they logged using Google, I'd like to also have their FB account. </p>
  
  <p>It is a hobby site, there isn't great security requirements, so please don't answer that this isn't a wise security implementation. </p>
  
  <p>Later, I'd create a <a href="https://docs.djangoproject.com/en/dev/topics/auth/customizing/#substituting-a-custom-user-model" rel="noreferrer">custom user model</a> to have just the email as the login id. But I'll be happy with an answer that just let me automatically associate a accounts of the default user model that has a required username. </p>
  
  <p>I'm using Django==1.5.4 and django-allauth==0.13.0</p>