Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_gmail_oauth_backend-0.1.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file django_gmail_oauth_backend-0.1.0.tar.gz.

File metadata

File hashes

Hashes for django_gmail_oauth_backend-0.1.0.tar.gz
Algorithm Hash digest
SHA256 479d3b5df10f78195d3278431b99642c563eecc5654b1a3e6e1ec8775690ab94
MD5 827cc6d53e706175b0b24f0e7f8879de
BLAKE2b-256 a5024e850d9fd5c6d90be56e2f708ab5c6e0e89010a1fd7835b71df999435353

See more details on using hashes here.

File details

Details for the file django_gmail_oauth_backend-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_gmail_oauth_backend-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 614764410741efdeae4c75ebbbdb12dd131c526cdb1d2ff4412c72711949f2de
MD5 64569ec83470dafb4fce77a733ada682
BLAKE2b-256 f728677b7c9ebab9c169db3d84ba57f39c9e1966b6f2065feca3e934030e5cd5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page