Skip to content

Commit 3737546

Browse files
committed
Add info to docs and comments
+ Add comments by @chubz regarding django-allauth hmac pattern from PR #233 + Cleanup
1 parent 35fe1ae commit 3737546

File tree

6 files changed

+8
-5
lines changed

6 files changed

+8
-5
lines changed

docs/api_endpoints.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ Basing on example from installation section :doc:`Installation </installation>`
7777
- access_token
7878
- code
7979

80+
.. 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
81+
8082
- /rest-auth/twitter/ (POST)
8183

8284
- access_token

docs/changelog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Changelog
44
0.8.0
55
-----
66
- added support for django-rest-framework-jwt
7+
- added support for django-allauth hmac email confirmation pattern
78
- bugfixes
89

910
0.7.0

docs/faq.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ FAQ
77

88
.. code-block:: python
99
10-
url(r'^account-confirm-email/(?P<key>\w+)/$', TemplateView.as_view(),
10+
url(r'^account-confirm-email/(?P<key>[-:\w]+)/$', TemplateView.as_view(),
1111
name='account_confirm_email'),
1212
1313
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.
1414

1515
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.
1616
If you don't want to use API on that step, then just use ConfirmEmailView view from:
17-
djang-allauth https://github.com/pennersr/django-allauth/blob/master/allauth/account/views.py#L190
17+
django-allauth https://github.com/pennersr/django-allauth/blob/master/allauth/account/views.py
1818

1919

2020
2. I get an error: Reverse for 'password_reset_confirm' not found.

rest_auth/registration/serializers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def get_social_login(self, adapter, app, token, response):
3636
:param app: `allauth.socialaccount.SocialApp` instance
3737
:param token: `allauth.socialaccount.SocialToken` instance
3838
:param response: Provider's response for OAuth1. Not used in the
39-
:return: :return: A populated instance of the `allauth.socialaccount.SocialLoginView` instance
39+
:returns: A populated instance of the `allauth.socialaccount.SocialLoginView` instance
4040
"""
4141
request = self._get_request()
4242
social_login = adapter.complete_login(request, app, token, response=response)

rest_auth/registration/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# with proper key.
1818
# If you don't want to use API on that step, then just use ConfirmEmailView
1919
# view from:
20-
# django-allauth https://github.com/pennersr/django-allauth/blob/master/allauth/account/views.py#L190
20+
# django-allauth https://github.com/pennersr/django-allauth/blob/master/allauth/account/views.py
2121
url(r'^account-confirm-email/(?P<key>[-:\w]+)/$', TemplateView.as_view(),
2222
name='account_confirm_email'),
2323
]

rest_auth/social_serializers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def get_social_login(self, adapter, app, token, response):
2626
:param app: `allauth.socialaccount.SocialApp` instance
2727
:param token: `allauth.socialaccount.SocialToken` instance
2828
:param response: Provider's response for OAuth1. Not used in the
29-
:return: :return: A populated instance of the `allauth.socialaccount.SocialLoginView` instance
29+
:returns: A populated instance of the `allauth.socialaccount.SocialLoginView` instance
3030
"""
3131
request = self._get_request()
3232
social_login = adapter.complete_login(request, app, token, response=response)

0 commit comments

Comments
 (0)