python - django social auth , create user model with email as primary key -
i trying integrate django social auth website have facebook , google login. trying customize user model make email primary key. advice ? tried creating usermodel ended errors. tried creating pipeline enter code here
from social_auth.backends.pipeline.user import create_user def custom_create_user(request, *args, **kwargs): print kwargs return create_user(request, args, kwargs)
my aim have site facebook , google - oauth2 login email primary key !
well doing facebook login ios app. doing is
- login facebook app , facebook access token
- send facebook email , access token django backend
- then is, instead of using django default authenticate method takes username , password authenticate user, overwrite own authenticate method. doing easy read django custom authentication
- in custom authentication class verify email-token pair sent front using fb sdk python , it. after can login user using django in built login
Comments
Post a Comment