From 79c0bdcae3e881ad207b701d728da9440a2163c4 Mon Sep 17 00:00:00 2001 From: Viicos <65306057+Viicos@users.noreply.github.com> Date: Mon, 8 Apr 2024 17:18:02 +0200 Subject: [PATCH] Add `DISABLE_2FA` config in base --- src/objecttypes/conf/base.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/objecttypes/conf/base.py b/src/objecttypes/conf/base.py index 2c46100f..135f89a7 100644 --- a/src/objecttypes/conf/base.py +++ b/src/objecttypes/conf/base.py @@ -425,3 +425,6 @@ OIDC_AUTHENTICATE_CLASS = "mozilla_django_oidc_db.views.OIDCAuthenticationRequestView" MOZILLA_DJANGO_OIDC_DB_CACHE = "oidc" MOZILLA_DJANGO_OIDC_DB_CACHE_TIMEOUT = 5 * 60 + +if config("DISABLE_2FA", default=False): # pragma: no cover + MAYKIN_2FA_ALLOW_MFA_BYPASS_BACKENDS = AUTHENTICATION_BACKENDS