身份验证和我的身份验证

我试图安装位于https://github.com/omab/django-social-auth上的django社交身份验证,我如何关联常规注册和社交身份验证,例如用户在Twitter中没有任何帐户或facebook等。我如何将django.contrib.auth与社交认证相关联

通过给他选择注册正常注册或在Twitter或Facebook上使用他的帐户


django-social-auth提供了与特定后端(例如Google,Facebook或Twitter)进行身份验证的视图。 查看在social_auth的URLconf中定义的代码:https://github.com/omab/django-social-auth/blob/master/social_auth/urls.py

一旦你安装了social_auth ,如果你想用Twitter登录,你可以访问指定相应后端的begin url(例如/ login / twitter /)。 social_auth应用程序会将用户重定向到Twitter,然后他们会授权您的应用程序,然后您将重定向到complete url(例如/ complete / twitter)。

如果您想将Twitter帐户与现有用户(即通过admin应用创建的用户或类似django-registrationassociate_begin ,则可以访问associate_begin url(例如“/ associate / twitter /”)。

这一切都假定您的根URLconf包含一个条目,如:

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

上一篇: Auth and My Auth

下一篇: Memory Issues in C++