11. pip install django-allauth
2
32. INSTALLED_APPS = [
4 'django.contrib.auth',
5 'django.contrib.messages',
6 'django.contrib.sites',
7
8 'allauth',
9 'allauth.account',
10 'allauth.socialaccount',
11 ]
12
133. AUTHENTICATION_BACKENDS = [
14 'django.contrib.auth.backends.ModelBackend',
15 'allauth.account.auth_backends.AuthenticationBackend',
16 ]
17
184. SITE_ID = 1
19
205. urlpatterns = [
21 path('accounts/', include('allauth.urls')),
22]
1SOCIALACCOUNT_PROVIDERS = {
2 'google': {
3 # For each OAuth based provider, either add a ``SocialApp``
4 # (``socialaccount`` app) containing the required client
5 # credentials, or list them here:
6 'APP': {
7 'client_id': '123',
8 'secret': '456',
9 'key': ''
10 }
11 }
12}