Auth and My Auth

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


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 (eg /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 (eg /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 (eg "/associate/twitter/").

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

url(r'', include('social_auth.urls')),
链接地址: http://www.djcxy.com/p/63276.html

上一篇: 使用django无法使用twitter登录

下一篇: 身份验证和我的身份验证