
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
django-oauth-emailbackend
Advanced tools
Django emailbackend that using OAuth Gmail API or SMTP server.
First, install the python package.
pip install django-oauth-emailbackend
Then, add the following to the settings.py
of your project:
INSTALLED_APPS = [
...
'django.contrib.sites',
'oauth_emailbackend',
...
]
#----- django-oauth-emailbackend settings -----#
# EMAIL_BACKEND๋ฅผ OAuthEmailBackend ์ค์
# Celery๋ฅผ ์ด์ฉํ์ฌ ๋ฐ์กํ๋ ๊ฒฝ์ฐ CELERY_BROKER_URL ๊ฐ์ ์ค์ ํ์ฌ์ผ ํฉ๋๋ค.
EMAIL_BACKEND = 'oauth_emailbackend.backends.OAuthEmailBackend'
# ๋ฐ์ก๋ด์ญ์ ์ ์ฅํ DATABASE_NAME
OAUTH_EMAILCLIENT_DBNAME = 'default'
# OAuth ๋ชฉ๋ก
OAUTH_EMAILBACKEND_PROVIDERS = (
'oauth_emailbackend.providers.gmail',
)
# ์ฝ๋ฐฑ ๋๋ฉ์ธ์ ํ์ฌ ์ฌ์ดํธ ๋๋ฉ์ธ๊ณผ ๋ค๋ฅด๊ฒ ์ง์ ํ๋ ค๋ฉด ์ค์ . ์) https://domain.to
OAUTH_EMAILBACKEND_CALLBACK_HOST = None
OAUTH_EMAILBACKEND_USE_CELERY = True
OAUTH_EMAILBACKEND_CELERY_MAX_RETRY = 3 # default=3
# OS SMTP server name
OAUTH_EMAILBACKEND_MTA = 'postfix' # [None|postfix]
#----- celery settings -----#
# Celery๋ฅผ ์ด์ฉํ์ฌ ๋ฐ์กํ ๊ฒฝ์ฐ CELERY_BROKER_URL ์ธํ
CELERY_BROKER_URL = "<broker url for celery>"
#
# * Test run celery in localhost
# celery -A config worker -l info -E
Additionally, add this to your project urls.py:
urlpatterns = [
...
# Add OAuth Emailbackend urls
path('oauth_emailbackend/', include('oauth_emailbackend.urls')),
...
]
In your Django root execute the command below to create your database tables:
python manage.py migrate
Visit https://<host>/admin/oauth_emailbackend/oauthapi/
and
add OAuth API and Email Client app sequentially.
from django.core.mail import send_mail
send_mail("Subject here",
"Here is the message.",
"<sender-email-address>",
["<recipient-email-address>"],
fail_silently=False)
https://developers.google.com/gmail/api/guides
https://console.cloud.google.com/
API ๊ฐ์คOAuth 2.0 ํด๋ผ์ด์ธํธ ID
์์ฑhttps://<host>/oauth_emailbackend/oauth2callback/gmail
์ ์
๋ ฅFAQs
Django emailbackend that using OAuth Gmail API or SMTP server.
We found that django-oauth-emailbackend 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
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600ร faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.