mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-11-22 00:56:34 +03:00
Add info to docs and comments
+ Add comments by @chubz regarding django-allauth hmac pattern from PR #233 + Cleanup
This commit is contained in:
parent
35fe1ae590
commit
37375461df
|
@ -77,6 +77,8 @@ Basing on example from installation section :doc:`Installation </installation>`
|
|||
- access_token
|
||||
- code
|
||||
|
||||
.. note:: ``access_token`` OR ``code`` can be used as standalone arguments, see https://github.com/Tivix/django-rest-auth/blob/master/rest_auth/registration/views.py
|
||||
|
||||
- /rest-auth/twitter/ (POST)
|
||||
|
||||
- access_token
|
||||
|
|
|
@ -4,6 +4,7 @@ Changelog
|
|||
0.8.0
|
||||
-----
|
||||
- added support for django-rest-framework-jwt
|
||||
- added support for django-allauth hmac email confirmation pattern
|
||||
- bugfixes
|
||||
|
||||
0.7.0
|
||||
|
|
|
@ -7,14 +7,14 @@ FAQ
|
|||
|
||||
.. code-block:: python
|
||||
|
||||
url(r'^account-confirm-email/(?P<key>\w+)/$', TemplateView.as_view(),
|
||||
url(r'^account-confirm-email/(?P<key>[-:\w]+)/$', TemplateView.as_view(),
|
||||
name='account_confirm_email'),
|
||||
|
||||
This url is used by django-allauth. Empty TemplateView is defined just to allow reverse() call inside app - when email with verification link is being sent.
|
||||
|
||||
You should override this view/url to handle it in your API client somehow and then, send post to /verify-email/ endpoint with proper key.
|
||||
If you don't want to use API on that step, then just use ConfirmEmailView view from:
|
||||
djang-allauth https://github.com/pennersr/django-allauth/blob/master/allauth/account/views.py#L190
|
||||
django-allauth https://github.com/pennersr/django-allauth/blob/master/allauth/account/views.py
|
||||
|
||||
|
||||
2. I get an error: Reverse for 'password_reset_confirm' not found.
|
||||
|
|
|
@ -36,7 +36,7 @@ class SocialLoginSerializer(serializers.Serializer):
|
|||
:param app: `allauth.socialaccount.SocialApp` instance
|
||||
:param token: `allauth.socialaccount.SocialToken` instance
|
||||
:param response: Provider's response for OAuth1. Not used in the
|
||||
:return: :return: A populated instance of the `allauth.socialaccount.SocialLoginView` instance
|
||||
:returns: A populated instance of the `allauth.socialaccount.SocialLoginView` instance
|
||||
"""
|
||||
request = self._get_request()
|
||||
social_login = adapter.complete_login(request, app, token, response=response)
|
||||
|
|
|
@ -17,7 +17,7 @@ urlpatterns = [
|
|||
# with proper key.
|
||||
# If you don't want to use API on that step, then just use ConfirmEmailView
|
||||
# view from:
|
||||
# django-allauth https://github.com/pennersr/django-allauth/blob/master/allauth/account/views.py#L190
|
||||
# django-allauth https://github.com/pennersr/django-allauth/blob/master/allauth/account/views.py
|
||||
url(r'^account-confirm-email/(?P<key>[-:\w]+)/$', TemplateView.as_view(),
|
||||
name='account_confirm_email'),
|
||||
]
|
||||
|
|
|
@ -26,7 +26,7 @@ class TwitterLoginSerializer(serializers.Serializer):
|
|||
:param app: `allauth.socialaccount.SocialApp` instance
|
||||
:param token: `allauth.socialaccount.SocialToken` instance
|
||||
:param response: Provider's response for OAuth1. Not used in the
|
||||
:return: :return: A populated instance of the `allauth.socialaccount.SocialLoginView` instance
|
||||
:returns: A populated instance of the `allauth.socialaccount.SocialLoginView` instance
|
||||
"""
|
||||
request = self._get_request()
|
||||
social_login = adapter.complete_login(request, app, token, response=response)
|
||||
|
|
Loading…
Reference in New Issue
Block a user