开发者

Django-Socialauth - How to associate multiple authentication providers to a single user account

Django-Social in its feature list claims that it supports associating multiple authentication providers to a single user account.

I can't seem to figure ou开发者_高级运维t how to use that feature.

When I try to login using a new authentication provider it automatically seems to be creating a new account for each provider.

Any ideas?

Sarvi


Take a look to django-social-auth, it's simpler and easier to setup than Django-Socialauth.

Multiple account association is supported but limited to logged in users to avoid the decision of which user instance must be removed.


it supports associating multiple authentication providers to a single user account

By looking at the code for models.py here, socialauth has a UserProfile for each provider, associating them to the User object which you use for basic authentication. So indeed, what it claims is true.


It can be done manually through admin once you have logged in with multiple accounts. Then the Socialauth models for the accounts can be adjusted to point at the User they are required too and multiple accounts can point to the same user.

But I have not had a good enough look to work out how to let users do this automatically for themselves. It does not work out of the box if you sign in to another account if while already signed into an existing account.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜