Skip to content
Snippets Groups Projects
Verified Commit de139517 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Only use 2fa login view if 2fa is enabled.

parent 0c4c6859
No related branches found
No related tags found
1 merge request!59Resolve "2FA"
......@@ -230,7 +230,6 @@ USE_TZ = True
STATIC_URL = _settings.get('static.url', '/static/')
MEDIA_URL = _settings.get('media.url', '/media/')
LOGIN_URL = 'two_factor:login'
LOGIN_REDIRECT_URL = 'index'
LOGOUT_REDIRECT_URL = 'index'
......@@ -323,6 +322,8 @@ if _settings.get('2fa.enabled', False):
INSTALLED_APPS.insert(INSTALLED_APPS.index('biscuit.core')+1, app)
MIDDLEWARE.insert(MIDDLEWARE.index('django.contrib.auth.middleware.AuthenticationMiddleware')+1, 'django_otp.middleware.OTPMiddleware')
LOGIN_URL = 'two_factor:login'
if _settings.get('2fa.yubikey.enabled', False):
INSTALLED_APPS.insert(INSTALLED_APPS.index('two_factor')+1, 'otp_yubikey')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment