Skip to content

Commit bb7b127

Browse files
committed
Adjusted phrasing and layout of social integration examples
1 parent b6e991e commit bb7b127

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

docs/installation.rst

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ Registration (optional)
6565
Social Authentication (optional)
6666
--------------------------------
6767

68-
Using ``django-allauth``, ``django-rest-auth`` provides helpful class for creating social media authentication view. Below is an example with Facebook authentication.
68+
Using ``django-allauth``, ``django-rest-auth`` provides helpful class for creating social media authentication view.
6969

70-
.. note:: Points 1, 2 and 3 are related with ``django-allauth`` configuration, so if you have already configured social authentication, then please go to step 4. See ``django-allauth`` documentation for more details.
70+
.. note:: Points 1 and 2 are related to ``django-allauth`` configuration, so if you have already configured social authentication, then please go to step 3. See ``django-allauth`` documentation for more details.
7171

72-
1. Add ``allauth.socialaccount`` and ``allauth.socialaccount.providers.facebook`` apps to INSTALLED_APPS in your django settings.py:
72+
1. Add ``allauth.socialaccount`` and ``allauth.socialaccount.providers.facebook`` or ``allauth.socialaccount.providers.twitter`` apps to INSTALLED_APPS in your django settings.py:
7373

7474
.. code-block:: python
7575
@@ -91,6 +91,9 @@ Using ``django-allauth``, ``django-rest-auth`` provides helpful class for creati
9191
9292
2. Add Social Application in django admin panel
9393

94+
Facebook
95+
########
96+
9497
3. Create new view as a subclass of ``rest_auth.registration.views.SocialLoginView`` with ``FacebookOAuth2Adapter`` adapter as an attribute:
9598

9699
.. code-block:: python
@@ -110,11 +113,13 @@ Using ``django-allauth``, ``django-rest-auth`` provides helpful class for creati
110113
url(r'^rest-auth/facebook/$', FacebookLogin.as_view(), name='fb_login')
111114
)
112115
113-
5. If you are using Twitter for your social authentication, it is a bit different from
114-
Facebook since Twitter uses OAuth 1.0.
115116
117+
Twitter
118+
#######
119+
120+
If you are using Twitter for your social authentication, it is a bit different since Twitter uses OAuth 1.0.
116121

117-
6. Create new view as a subclass of ``rest_auth.views.LoginView`` with ``TwitterOAuthAdapter`` adapter and ``TwitterLoginSerializer`` as an attribute:
122+
3. Create new view as a subclass of ``rest_auth.views.LoginView`` with ``TwitterOAuthAdapter`` adapter and ``TwitterLoginSerializer`` as an attribute:
118123

119124
.. code-block:: python
120125
@@ -126,7 +131,7 @@ Using ``django-allauth``, ``django-rest-auth`` provides helpful class for creati
126131
serializer_class = TwitterLoginSerializer
127132
adapter_class = TwitterOAuthAdapter
128133
129-
7. Create url for TwitterLogin view:
134+
4. Create url for TwitterLogin view:
130135

131136
.. code-block:: python
132137

0 commit comments

Comments
 (0)