Security News
CISA Brings KEV Data to GitHub
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
django-gmail-oauth-backend
Advanced tools
Simplifies Gmail authentication for Django applications using OAuth 2.0. WITHOUT App Passwords!
Simplifies Gmail authentication for Django applications using OAuth 2.0. WITHOUT App Passwords!
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.
# Create RefreshToken table First
./manage.py migrate
# Then get the RefreshToken
./manage.py init_gmail_oauth_token
Note: The Refresh Token is stored in the database and is used to automatically refresh the Access Token when it expires. The Google OAuth 2.0 refresh token typically does not have an expiration date, but if a refresh token becomes invalid or expires for other reasons, it will need to be reissued following the procedure above.
FAQs
Simplifies Gmail authentication for Django applications using OAuth 2.0. WITHOUT App Passwords!
We found that django-gmail-oauth-backend demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.