RealmTeam / django-rest-framework-social-oauth2

python-social-auth and oauth2 support for django-rest-framework
MIT License
1.06k stars 191 forks source link

User registration with email via Facebook login #122

Closed Bulva closed 7 years ago

Bulva commented 7 years ago

Hi Philip, I started with your library and it is really easy to setup, but I have some problems and probably misunderstanding with registraton of users (something like #4).

Everything from your tutorial works as expected (e.g. converttoken). But I don't understand the registration of users. If I access this url localhost:8000/auth/login/facebook/ I've redirected to facebook app login page. I permit using the email and my account and then I am redirected to [localhost:8000/accounts/profile/#=](http://localhost:8000/accounts/profile/#=_). This all is OK.

But I expect that new user account related to facebook account will be in auth_user (native django table). This is probably bad expectation. I found new record in Social Django -> User Social Auths. Looks like this: selection_010

Is this thinks as a user registration? Uid should be user identification of facebook I expect. So how can I make custom profile information for the user which will be populated during the user using the app? Because there is not an email, or something which I can use for joining to auth_user table. And like the user there is my superuser which registered the Django app.

Best regards Bulva

PhilipGarnero commented 7 years ago

Hello Bulva,

You can read about email association in the doc of python social auth