Social Auth App Django

Django integration for python-social-auth, adding social login and registration to Django projects

Library
PyPI
v6.0.1
2,141stars
BSD 3-Clause License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
87/100Excellent
Development Activity100
Maintenance72
Community76
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
82/100Excellent
Architecture84
Code Quality85
Innovation78
Learning Curve80

social-auth-app-django is the Django component of the python-social-auth ecosystem. It provides the models, views, URLs, middleware, and storage needed to plug social-auth-core into a Django project, giving you an easy-to-set-up social authentication and registration mechanism.

With it you can offer login and signup through dozens of providers over OAuth1, OAuth2, OpenID, and SAML, backed by Django’s ORM for user association and token persistence. It follows the currently supported Django releases and integrates cleanly with Django’s authentication system.

What You Get

  • Django models and a Django ORM storage backend for user-social associations and tokens
  • Prebuilt views and URL patterns for the login, complete, and disconnect flows
  • A Django authentication strategy and middleware that hook into Django’s auth system
  • Access to the full python-social-auth provider catalog via social-auth-core
  • Context processors, admin integration, and pipeline customization hooks

Common Use Cases

  • Adding ‘Sign in with Google/GitHub/Facebook’ to a Django site
  • Supporting enterprise SSO via SAML or OpenID Connect in Django
  • Associating multiple social accounts with a single Django user
  • Persisting OAuth access and refresh tokens for later API calls

Under The Hood

Architecture - The package sits as a Django app (social_django) on top of social-auth-core: strategy.py adapts core’s Strategy to Django’s request/session, storage.py maps core’s storage interface onto Django models (models.py), and views.py plus urls.py expose the begin/complete/disconnect endpoints, while middleware.py handles exceptions and context_processors.py surfaces backend data to templates.

Tech Stack - Pure Python built against Django and social-auth-core, packaged via pyproject.toml, with migrations for its models and a management command layer; testing is orchestrated through tox across supported Django versions.

Code Quality - The repo includes a dedicated tests/ directory, ships typed code (py.typed), maintains a CHANGELOG, and follows Semantic Versioning, reflecting a mature and actively maintained project focused on the currently supported Django releases.

API Design - Integration is declarative: add the app to INSTALLED_APPS, include its URLs, set backend and pipeline settings, and the provided views handle the flow. Customization happens through well-documented settings and pipeline functions, keeping boilerplate low for standard use.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search