I see 2 alterntive when you want to handle with multiple account association:
- Find a unique attribute that all identity provider has.
- Keep a base authentication and link all the rest identity providers to its.
The first approach has 2 disadvantages
Is possible that does not exist any attibute that is present in all the identity provider.
One common implementatios that people did in the past is to use the email as this attribute to identity the user, but for example Twitter does not share the email anymore.
Is posible to find a non consistent problem. For example people can set differents values for an username or for a email in the differents providers.
I recommend you to implement the second approach. Set a primary identity provider (ldap, database or an authentication closed and secure for you). And each time a user want link a "X identity provider to your account", look for the attribute that this provider use and save in a table this relation between your primary identity and that new identity.
Keep also aware about the data colision. Set what provider will have preference when setting the data for your local account, in order to not turn your data wrong or expired.
(Read somethig about "Level of assurance)
This is an old debate so first of implement something, start to read. There are many interesting documentation about this issues
Related to the specific problem in django. Read this comparation between the differents djago social-auth apps. Also check django-socialprofile and this old thread