Easily add Google Authentication to your Django Projects
Maintained. Last release 5 months ago, commits in 1 of the last 26 weeks. Weaker on commit activity and release cadence.
pip install django-google-sso
Easily integrate Google Authentication into your Django projects
Welcome to Django Google SSO
This library simplifies the process of authenticating users with Google in Django projects. It adds a customizable "Login with Google" button to your Django Admin login page with minimal configuration.
Why use Django Google SSO?
- Simplicity: Adds Google authentication with minimal setup and no template modifications
- Admin Integration: Seamlessly integrates with the Django Admin interface
- Customizable: Works with popular Django Admin skins like Grappelli, Jazzmin, and more
- Modern: Uses the latest Google authentication libraries
- Secure: Follows OAuth 2.0 best practices for authentication, including PKCE support
Quick Start
Installation
$ pip install django-google-sso
Compatibility
- Python 3.11, 3.12, 3.13, 3.14
- Django 5.0, 5.1, 5.2, 6.0
Older python/django versions are not supported.
Configuration
- Add to your
settings.py:
# settings.py
INSTALLED_APPS = [
# other django apps
"django.contrib.messages", # Required for auth messages
"django_google_sso", # Add django_google_sso
]
# Google OAuth2 credentials
GOOGLE_SSO_CLIENT_ID = "your client id here"
GOOGLE_SSO_PROJECT_ID = "your project id here"
GOOGLE_SSO_CLIENT_SECRET = "your client secret here"
# Auto-create users from these domains
GOOGLE_SSO_ALLOWABLE_DOMAINS = ["example.com"]