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

  1. login facebook app , facebook access token
  2. send facebook email , access token django backend
  3. then is, instead of using django default authenticate method takes username , password authenticate user, overwrite own authenticate method. doing easy read django custom authentication
  4. 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

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -