allauth django code example
Example 1: allauth
1. pip install django-allauth
2. INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.messages',
'django.contrib.sites',
'allauth',
'allauth.account',
'allauth.socialaccount',
]
3. AUTHENTICATION_BACKENDS = [
'django.contrib.auth.backends.ModelBackend',
'allauth.account.auth_backends.AuthenticationBackend',
]
4. SITE_ID = 1
5. urlpatterns = [
path('accounts/', include('allauth.urls')),
]
Example 2: pip install django-allauth
pip install django-allauth