how do i connect multiple social auth providers to the same django user using django-allauth?

好久不见. 提交于 2019-12-21 02:22:10

问题


can connect to facebook and twitter, but how do i connect a normal django user to both his facebook and twitter networks, so that the next time he has the option of logging in through any 1 of the 3 and i can utilise information from both the networks.

can the signal :-

allauth.socialaccount.signals.pre_social_login

be used to check if a user is already logged in if yes connect the social account to the django account, but i cant figure out how to go about implementing this in the login view.


回答1:


connecting to different social providers turned out to be pretty easy. The same url which was used to login the users to a social provider if accessed inside a users home page( ie the page a normal django user will see after logging in using django auth) links your django profile to the social app profile automatically.

now I am looking into how to use the graph api along with allauth to fetch friend lists, post to wall etc



来源:https://stackoverflow.com/questions/13037644/how-do-i-connect-multiple-social-auth-providers-to-the-same-django-user-using-dj

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!