mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-11-29 04:23:42 +03:00
parent
fed6b9840c
commit
3eb546f633
|
@ -161,10 +161,35 @@ If you are using Twitter for your social authentication, it is a bit different s
|
||||||
urlpatterns += [
|
urlpatterns += [
|
||||||
...,
|
...,
|
||||||
url(r'^rest-auth/twitter/$', TwitterLogin.as_view(), name='twitter_login')
|
url(r'^rest-auth/twitter/$', TwitterLogin.as_view(), name='twitter_login')
|
||||||
url(r'^rest-auth/twitter/connect/$', TwitterConnect.as_view(), name='twitter_login')
|
url(r'^rest-auth/twitter/connect/$', TwitterConnect.as_view(), name='twitter_connect')
|
||||||
]
|
]
|
||||||
.. note:: Starting from v0.21.0, django-allauth has dropped support for context processors. Check out http://django-allauth.readthedocs.org/en/latest/changelog.html#from-0-21-0 for more details.
|
.. note:: Starting from v0.21.0, django-allauth has dropped support for context processors. Check out http://django-allauth.readthedocs.org/en/latest/changelog.html#from-0-21-0 for more details.
|
||||||
|
|
||||||
|
Additional Social Connect Views
|
||||||
|
###############################
|
||||||
|
|
||||||
|
If you are using social connect views, you can also use additional views to check all social accounts attached to the current authenticated user and disconnect selected social accounts.
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
from rest_auth.registration.views import (
|
||||||
|
SocialAccountListView, SocialAccountDisconnectView
|
||||||
|
)
|
||||||
|
|
||||||
|
urlpatterns += [
|
||||||
|
...,
|
||||||
|
url(
|
||||||
|
r'^socialaccounts/$',
|
||||||
|
SocialAccountListView.as_view(),
|
||||||
|
name='social_account_list'
|
||||||
|
),
|
||||||
|
url(
|
||||||
|
r'^socialaccounts/(?P<pk>\d+)/disconnect/$',
|
||||||
|
SocialAccountDisconnectView.as_view(),
|
||||||
|
name='social_account_disconnect'
|
||||||
|
)
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
JWT Support (optional)
|
JWT Support (optional)
|
||||||
----------------------
|
----------------------
|
||||||
|
|
Loading…
Reference in New Issue
Block a user