0

i tried to install django social auth, which is located on https://github.com/omab/django-social-auth how can i associate a regular registration and social auth for example a user doesn't have any account in twitter or facebook etc .. how can i associate django.contrib.auth with social auth

by giving him the choice of choosing either to register normal registration or using his account in twitter or facebook

mohd
  • 2,634
  • 2
  • 16
  • 18

1 Answers1

0

django-social-auth provides views for authenticated with a particular backend (such as Google, Facebook, or Twitter). Take a look at the code defined in social_auth's URLconf: https://github.com/omab/django-social-auth/blob/master/social_auth/urls.py

Once you've got social_auth installed, if you want to log in with Twitter, you'd visit the begin url specifying the appropriate backend (e.g. /login/twitter/). The social_auth app would then redirect your user to Twitter, at which point they'd authorize your app, then you'd get redirected back the complete url (e.g. /complete/twitter).

If you wanted to associate a Twitter account with an existing user (that is, a User created via the admin app, or something like django-registration), you'd visit the associate_begin url (e.g. "/associate/twitter/").

This all assumes that your root URLconf contains an entry like:

url(r'', include('social_auth.urls')),
Brad Montgomery
  • 2,621
  • 1
  • 24
  • 24