Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 372
ajish Avatar asked Nov 03 '22 13:11

ajish


1 Answers

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

like image 116
ajish Avatar answered Nov 15 '22 05:11

ajish