我尝试安装位于 https://github.com/omab/django-social-auth上的 django social auth 我如何关联常规注册和社交身份验证,例如用户在 Twitter 中没有任何帐户或facebook 等 .. 我如何将 django.contrib.auth 与社交身份验证相关联
通过让他选择注册正常注册或使用他在 twitter 或 facebook 中的帐户
我尝试安装位于 https://github.com/omab/django-social-auth上的 django social auth 我如何关联常规注册和社交身份验证,例如用户在 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-registration
)关联,您将访问该associate_begin
url(例如“/associate/twitter/”)。
这一切都假定您的根 URLconf 包含如下条目:
url(r'', include('social_auth.urls')),