Add TOTP support with django-otp

This commit is contained in:
Danielle McLean 2017-10-25 01:25:03 +11:00
parent 492ba744fc
commit 3f3bb05a25
Signed by: 00dani
GPG key ID: 5A5D2D1AFF12EEC5
5 changed files with 27 additions and 1 deletions

View file

@ -66,6 +66,8 @@ INSTALLED_APPS = [
'compressor',
'django_activeurl',
'django_otp',
'django_otp.plugins.otp_totp',
'favicon',
'meta',
@ -82,6 +84,7 @@ MIDDLEWARE = [
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django_otp.middleware.OTPMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
@ -190,6 +193,10 @@ MEDIA_ROOT = os.path.join(STATIC_ROOT, 'media')
# Settings specific to lemoncurry
LEMONCURRY_SITE_NAME = '00dani.me'
# django-otp
# https://django-otp-official.readthedocs.io/en/latest/overview.html
OTP_TOTP_ISSUER = LEMONCURRY_SITE_NAME
# django-meta
# https://django-meta.readthedocs.io/en/latest/settings.html
META_SITE_PROTOCOL = 'https'