Skip to content

Commit

Permalink
Add email verification
Browse files Browse the repository at this point in the history
  • Loading branch information
tomik-z-cech committed Nov 23, 2023
1 parent db45622 commit 491242a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions glimmer/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,20 @@

# Crispy forms bootstrap pack
CRISPY_TEMPLATE_PACK = 'bootstrap4'

# Email verification
AUTHENTICATION_BACKENDS = [
'django.contrib.auth.backends.ModelBackend',
'allauth.account.auth_backends.AuthenticationBackend',
]
ACCOUNT_EMAIL_VERIFICATION = 'mandatory'
ACCOUNT_EMAIL_REQUIRED = True
MAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' #new

# Gmail settings
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = os.environ.get('EMAIL_HOST_USER')
EMAIL_HOST_PASSWORD = os.environ.get('EMAIL_HOST_PASSWORD')
EMAIL_USE_TLS = True

0 comments on commit 491242a

Please sign in to comment.