A Django app for providing the Google's discovery based Oauth2 authentication mechanism is HTTP/HTTPS oriented Django Servers/Projects.
Project description
Google Auth [ Django ]
Why django-gauth?
Google sign-in for Django in 5 minutes — without the django-allauth configuration maze.
django-gauth does exactly one thing well: add Google OAuth2 login to an HTTP/HTTPS Django
project, with a working landing page included — no multi-provider abstractions, no sprawling
configuration, just the Google flow, clearly documented.
| django-gauth | django-allauth | Roll-your-own | |
|---|---|---|---|
| Setup for just Google | ⚡ Minimal (3 settings + 1 URL include) | 🧩 Broad, multi-step config | 🛠️ Manual OAuth wiring |
| Built-in login page | ✅ Ships a landing page | ➖ Bring your own templates | ❌ Build it yourself |
| Scope | 🎯 Google OAuth2 only | 🌐 Many providers | 🎯 Whatever you build |
| Learning curve | 📉 Low | 📈 Higher (large surface) | ⚠️ Easy to get OAuth subtly wrong |
| Typed & tested | ✅ Type hints + ~99% coverage | ✅ Mature | ➖ Up to you |
Reach for django-allauth when you need many providers, account linking, and email
workflows. Reach for django-gauth when you want Google sign-in working today with
minimal ceremony.
Installation
| Source | Command |
|---|---|
| GitHub | pip install -e git+https://github.com/masterPiece93/django-gauth.git#egg=django_gauth |
| PyPi | pip install django-gauth |
Quickstart
-
add the app name :
django_gauthin INSTALLED_APPS entry of you project ( in settings.py file ) -
add required configuration variables ( in settings.py file )
# settings.py GOOGLE_CLIENT_ID= env("GOOGLE_CLIENT_ID") # << set according to your oauth2 client GOOGLE_CLIENT_SECRET= env("GOOGLE_CLIENT_SECRET") # << set according to your oauth2 client GOOGLE_AUTH_FINAL_REDIRECT_URL= None # defaults to `<host>/gauth/` CREDENTIALS_SESSION_KEY_NAME= "credentials" # defaults to `credentials` STATE_KEY_NAME= "oauth_state" # defaults to `oauth_state` SCOPE= [ "https://www.googleapis.com/auth/userinfo.email" # always preffered ,"https://www.googleapis.com/auth/userinfo.profile" # always preffered ,"openid" # always preffered ,"https://www.googleapis.com/auth/drive" # based on your usage ] os.environ['OAUTHLIB_INSECURE_TRANSPORT'] = '1' # strictly for local-development only
os.environ['OAUTHLIB_INSECURE_TRANSPORT'] = '1'directs the server to accept in-secure (http) connections .
-
configure auth urls ( in urls.py file of root )
# urls.py from django.contrib import admin from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), path('gauth/', include('django_gauth.urls')), # add your other app's urls # ... ]
-
now run your project server
- once your server is up & running , navigate to
.../gauth, this is the master interface ( default landing page ) - click on
Authenticatebutton to launch Google Oauth2 Login . - just follow the flow you are directed to .
- post authentication , you'll be redirected back to
.../gauth
- once your server is up & running , navigate to
- NOTE :
useually all servers ( wsgi, asgi, uWsgi) runs default on
http://127.0.0.1:PORT/, hence always take care to set the redirect endpoints in your google oauth2 client app in accordance with 127.0.0.1 , don't mistake to consider localhost , 0.0.0.0 and 127.0.0.1 as the same thing while dealing with redirect uri's .- For example : suppose you have set
http://localhost:PORT/gauth/google-callbackas your redirect uri , then take note of running your django app on localhost:PORT only !!
- For example : suppose you have set
Changelog
See CHANGELOG.md for the full release history and notable changes in each version.
Releases
See Github Releases for the details of each release in each version .
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_gauth-0.2.2.tar.gz.
File metadata
- Download URL: django_gauth-0.2.2.tar.gz
- Upload date:
- Size: 64.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f4f363bc16ff8f9521059cd6eaade89999d0de65b06e9c45487ba2ebd5398f3
|
|
| MD5 |
bde8eccec8bc38e6a8c1ec31606b56c3
|
|
| BLAKE2b-256 |
6de0c6d299306886eaa5a8d80a9b90cd1149d4f02591e14510f11f7119f1fd08
|
Provenance
The following attestation bundles were made for django_gauth-0.2.2.tar.gz:
Publisher:
release.yml on masterPiece93/django-gauth
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_gauth-0.2.2.tar.gz -
Subject digest:
2f4f363bc16ff8f9521059cd6eaade89999d0de65b06e9c45487ba2ebd5398f3 - Sigstore transparency entry: 2008498837
- Sigstore integration time:
-
Permalink:
masterPiece93/django-gauth@622ade2adaa462e614c42bd4785b952649dd5ad8 -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/masterPiece93
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@622ade2adaa462e614c42bd4785b952649dd5ad8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file django_gauth-0.2.2-py3-none-any.whl.
File metadata
- Download URL: django_gauth-0.2.2-py3-none-any.whl
- Upload date:
- Size: 47.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b07475d2adc7c87c379e3b714547eac734e1412af82b93c41d7976d2f405b79
|
|
| MD5 |
50e3423dc82e6cb4de6d1547bab7e3e1
|
|
| BLAKE2b-256 |
e70188b3e4c90017be7a6f90d5af1147a5d814555318a9d82cfd803a5103bc9c
|
Provenance
The following attestation bundles were made for django_gauth-0.2.2-py3-none-any.whl:
Publisher:
release.yml on masterPiece93/django-gauth
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_gauth-0.2.2-py3-none-any.whl -
Subject digest:
8b07475d2adc7c87c379e3b714547eac734e1412af82b93c41d7976d2f405b79 - Sigstore transparency entry: 2008499052
- Sigstore integration time:
-
Permalink:
masterPiece93/django-gauth@622ade2adaa462e614c42bd4785b952649dd5ad8 -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/masterPiece93
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@622ade2adaa462e614c42bd4785b952649dd5ad8 -
Trigger Event:
release
-
Statement type: