Registry / security / django-google-sso

django-google-sso

JSON →
library9.0.3pypypiunverified

Easily add Google Authentication to your Django projects. Supports OAuth2 login, custom user models, multi-tenant setups, and automatic user creation. Current version 9.0.3, requires Python >=3.11 and Django. Active development.

pip install django-google-sso
INSTALL
IMPORT
SIG · DJANGO-GOOGLE-SSO
D
django-google-sso
securitypythonv9.0.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

GoogleSSO
from django_google_sso import GoogleSSO
from django_google_sso import GoogleSSO

Quickstart example showing import and configuration hints.

from django_google_sso import GoogleSSO # Minimal configuration in settings.py: # INSTALLED_APPS: # 'django_google_sso', # 'django.contrib.admin', # 'django.contrib.auth', # ... # GOOGLE_SSO_CLIENT_ID = os.environ.get('GOOGLE_SSO_CLIENT_ID', '') # GOOGLE_SSO_CLIENT_SECRET = os.environ.get('GOOGLE_SSO_CLIENT_SECRET', '') # After installation, run migrations and add google-sso URLs. # See: https://github.com/megalus/django-google-sso#readme
Debug
Known issues
breakingVersion 9.0.0 removed support for Python versions <3.11. Upgrade to Python 3.11+ before installing 9.x.
fix
Update Python to >=3.11 and run `pip install django-google-sso>=9.0.0,<10.0.0`.
affects: >=9.0.0,<10.0.0
breakingIn version 9.0.0, the configuration setting GOOGLE_SSO_SCOPE was renamed to GOOGLE_SSO_OAUTH_SCOPE. Existing projects must update their settings.
fix
Replace GOOGLE_SSO_SCOPE with GOOGLE_SSO_OAUTH_SCOPE in settings.py.
affects: >=9.0.0
gotchaIf you use a custom user model, you must set GOOGLE_SSO_AUTH_USER_MODEL or GOOGLE_SSO_USE_CUSTOM_USER. Misconfiguration leads to silent login failures.
fix
Set GOOGLE_SSO_USE_CUSTOM_USER = True in settings.py if your user model is not auth.User.
affects: >=1.0.0
gotchaThe default login redirect is to '/admin/'. To change it, set GOOGLE_SSO_AUTH_LOGIN_URL. Without this, users may get unexpected redirects.
fix
Add GOOGLE_SSO_AUTH_LOGIN_URL = '/my-custom-path/' in settings.py.
affects: >=1.0.0
deprecatedThe setting GOOGLE_SSO_AUTO_CREATE_FIRST_SUPERUSER is deprecated in v9.0.0; use GOOGLE_SSO_AUTO_LOGIN_ON_SIGNUP instead.
fix
Replace GOOGLE_SSO_AUTO_CREATE_FIRST_SUPERUSER with GOOGLE_SSO_AUTO_LOGIN_ON_SIGNUP = True.
affects: >=9.0.0
Upgrade
Version history
9.0.3latest on PyPI · released Mar 5, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
23 hits · last 30 days
node
20
OpenAI (training)
1
Resources