Académique Documents
Professionnel Documents
Culture Documents
1 Answer
Iamusingdjango_allauthinmyproject. (1)Howadjangouseraccountiscreatedwhenauserlogsinviaathirdpartysuchasfacebook? Youshouldtakealookat: 1. youradminpanelandseewhathappenswhensomebodylogsin. 2. allauth.facebook.views.loginandtrytotracktheloginprocess Itissomethinglikethis(inafewwords): 1. 2. 3. 4. 5. WhenauserlogsinyoursiteviahisFacebookcredentialsheisgivenanaccesstoken ThistokenissavedintheFACEBOOK_ACCESS_TOKENStable(youcanseeitintheadminpanel) WiththisaccesstokenandwiththehelpofFacebookGraphApiweknowhissocial_id Whenweknowhissocial_idwecanhavehisFacebookaccountfromourdatabase Ifwehaven'tsaveditinthedbalreadywesavetheFacebookaccountinthe FACEBOOK_ACCOUNTStable(FacebookAccountsintheadminpanel) 6. ThenwecreateauserintheUSERStablewiththedatapresentintheFacebookaccount.(youcan seethenewuserintheUserssectionintheadminpanel) (2)Whatusernameisassignedtothatuserandwhatpasswordisused? AsImentionedbeforewiththehelpofFacebookGraphApiwegettheusernameoftheFacebookuser anditisassignedtotheUserprofileasUser.username
Enablesupportfordjangoavatar.Whenenabled,theprofileimageoftheuseriscopiedlocallyinto djangoavataratsignup.
editedFeb8at13:33 answeredFeb7at17:21 forbdn 71 4
feedback
Not the answer you're looking for? Browse other questions tagged django registration
social user-profile or ask your own question.