Simplifies Gmail authentication for Django applications using OAuth 2.0. WITHOUT App Passwords!
Project description
django-gmail-oauth-backend
Simplifies Gmail authentication for Django applications using OAuth 2.0. WITHOUT App Passwords!
Installation
pip install django-gmail-oauth-backend
Add settings to your Django project settings file.
GMAIL_OAUTH_CLIENT_ID = 'YOUR_CLIENT_ID'
GMAIL_OAUTH_CLIENT_SECRET = 'YOUR_CLIENT_SECRET'
INSTALLED_APPS = [
...,
'gmail_oauth_backend',
...
]
And execute the following command at least once initially. This command will launch a web browser and request OAuth approval through the user’s browser. Once the request is completed, a Refresh Token for the Gmail API will be automatically issued. Before running this init command, please make sure to add http://localhost:8912/
to the redirect URLs in your Cloud Console settings.
./manage.py init_gmail_oauth_token
# OR
./manage.py set_gmail_oauth_token ---token YOUR_REFRESH_TOKEN
Credits
Authors & Contributors
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
File details
Details for the file django_gmail_oauth_backend-0.1.0.tar.gz
.
File metadata
- Download URL: django_gmail_oauth_backend-0.1.0.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 479d3b5df10f78195d3278431b99642c563eecc5654b1a3e6e1ec8775690ab94 |
|
MD5 | 827cc6d53e706175b0b24f0e7f8879de |
|
BLAKE2b-256 | a5024e850d9fd5c6d90be56e2f708ab5c6e0e89010a1fd7835b71df999435353 |
File details
Details for the file django_gmail_oauth_backend-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: django_gmail_oauth_backend-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 614764410741efdeae4c75ebbbdb12dd131c526cdb1d2ff4412c72711949f2de |
|
MD5 | 64569ec83470dafb4fce77a733ada682 |
|
BLAKE2b-256 | f728677b7c9ebab9c169db3d84ba57f39c9e1966b6f2065feca3e934030e5cd5 |