Social Auth - Setting up - Part 1

Documentation:
https://python-social-auth.readthedocs.io/en/latest/configuration/django.html

 

pip install social-auth-app-django

 

INSTALLED_APPS = [
    ...
    'social_django',
]

AUTHENTICATION_BACKENDS = (
    ...
    'django.contrib.auth.backends.ModelBackend',
)


SOCIAL_AUTH_PIPELINE = (
    'social_core.pipeline.social_auth.social_details',
    'social_core.pipeline.social_auth.social_uid',
    'social_core.pipeline.social_auth.auth_allowed',
    'social_core.pipeline.social_auth.social_user',
    'social_core.pipeline.user.get_username',
    'social_core.pipeline.social_auth.associate_by_email', 
    'social_core.pipeline.user.create_user',
    'social_core.pipeline.social_auth.associate_user',
    'social_core.pipeline.social_auth.load_extra_data',
    'social_core.pipeline.user.user_details',

)

SOCIAL_AUTH_URL_NAMESPACE = 'social'

 
 

urlpatterns = [
	...
    path('', include('social_django.urls', namespace='social'))
]

 


Python 3.12
Django==4.2


12 July 2024 | Last Updated: 22 Nov. 2025 | jaimedcsilva

Related
  • Social Auth - Setting up - Part 1
  • Social Auth - Google Cloud Platform - Part 2
  • Social Auth - Google Login - Part 3
  • Social Auth - Facebook Developers - Part 4
  • Social Auth - Facebook Login - Part 5
  • Social Auth - SOCIAL_AUTH_PIPELINE - Part 6

  • Buy Me a Coffee