You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/installation.rst
+39-1Lines changed: 39 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -131,7 +131,7 @@ Twitter
131
131
132
132
If you are using Twitter for your social authentication, it is a bit different since Twitter uses OAuth 1.0.
133
133
134
-
3. Create new view as a subclass of ``rest_auth.views.LoginView`` with ``TwitterOAuthAdapter`` adapter and ``TwitterLoginSerializer`` as an attribute:
134
+
3. Create new view as a subclass of ``rest_auth.registration.views.SocialLoginView`` with ``TwitterOAuthAdapter`` adapter and ``TwitterLoginSerializer`` as an attribute:
135
135
136
136
.. code-block:: python
137
137
@@ -154,6 +154,34 @@ If you are using Twitter for your social authentication, it is a bit different s
154
154
155
155
.. 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.
156
156
157
+
158
+
GitHub
159
+
######
160
+
161
+
If you are using GitHub for your social authentication, it uses code and not AccessToken directly.
162
+
163
+
3. Create new view as a subclass of ``rest_auth.views.SocialLoginView`` with ``GitHubOAuth2Adapter`` adapter, an ``OAuth2Client`` and a callback_url as attributes:
164
+
165
+
.. code-block:: python
166
+
167
+
from allauth.socialaccount.providers.github.views import GitHubOAuth2Adapter
168
+
from allauth.socialaccount.providers.oauth2.client import OAuth2Client
169
+
from rest_auth.registration.views import SocialLoginView
0 commit comments