Skip to main content

Django Google SSO

Easily integrate Google Authentication into your Django projects

PyPI Build PyPI - Python Version PyPI - Django Version License

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

  1. 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"]
  1. Add the callback URL in Google Console under "Authorized Redirect URIs":

    • For local development: http://localhost:8000/google_sso/callback/
    • For production: https://your-domain.com/google_sso/callback/
  2. Add to your urls.py:

# urls.py

from django.urls import include, path

urlpatterns = [
    # other urlpatterns...
    path(
        "google_sso/", include("django_google_sso.urls", namespace="django_google_sso")
    ),
]
  1. Run migrations:
$ python manage.py migrate

That's it! Start Django and visit http://localhost:8000/admin/login to see the Google SSO button:

Example project

A minimal Django project using this library is included in this repository under example_google_app/.

  • Read the step-by-step instructions in example_google_app/README.md
  • Use it as a reference to configure your own project settings and URLs

Documentation

For detailed documentation, visit:

License

This project is licensed under the terms of the MIT license.

Metadata

Release files for django-google-sso 10.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-google-sso 10.0.0
File Size Uploaded Provenance
django_google_sso-10.0.0.tar.gz 130.6 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for django-google-sso 10.0.0
File Interpreter ABI Platform
django_google_sso-10.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 164.9 kB

Release files / django_google_sso-10.0.0.tar.gz

Download URL django_google_sso-10.0.0.tar.gz
Size 130.6 kB
Tags Source
SHA-256 checksum
How to use checksums
777730876039cfe0c4b29e33374e9e7a84a06d0433c73d7353dd4f88742b546f
BLAKE2b-256 checksum
How to use checksums
432797b8231bdf6ef85ec17ed9b89747c31cddb01f775c582e851eaf08ae1719
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 17, 2026.

Transparency log

Release files / django_google_sso-10.0.0-py3-none-any.whl

Download URL django_google_sso-10.0.0-py3-none-any.whl
Size 34.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8212f60eeb63da259e4c254f52dfffd139e6e14251a98dc45edf68c7d4a40c8a
BLAKE2b-256 checksum
How to use checksums
577edfc5400f1f65a523d0f048cae9251b1aff72c4eaf44a0918bfb39ddea6a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 17, 2026.

Transparency log

Security for django-google-sso 10.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for django_google_sso-10.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

10.0.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page