diff --git a/biscuit/core/settings.py b/biscuit/core/settings.py index 78c56b8f3d80a51779edbcf5121119d9fffaadb2..449d3483634e8acd49a0748c4320cd2ac3bf336e 100644 --- a/biscuit/core/settings.py +++ b/biscuit/core/settings.py @@ -69,6 +69,7 @@ INSTALLED_APPS = [ 'django_otp.plugins.otp_totp', 'django_otp.plugins.otp_static', 'django_otp', + 'otp_yubikey', 'biscuit.core', 'impersonate', 'two_factor' @@ -324,9 +325,6 @@ ANONYMIZE_ENABLED = _settings.get('maintenance.anonymisable', True) LOGIN_URL = 'two_factor:login' -if _settings.get('2fa.yubikey.enabled', False): - INSTALLED_APPS.insert(INSTALLED_APPS.index('two_factor')+1, 'otp_yubikey') - if _settings.get('2fa.call.enabled', False): TWO_FACTOR_CALL_GATEWAY = 'two_factor.gateways.twilio.gateway.Twilio' diff --git a/pyproject.toml b/pyproject.toml index 47cd5dd09ac965241c21d7e9eae0bc6414586757..a934b232643cc58a448d81ac96db386c722710f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,14 +50,10 @@ django-hattori = "^0.2" psycopg2 = "^2.8" django_select2 = "^7.1" requests = "^2.22" -django-two-factor-auth = "^1.9" -django-otp-yubikey = { version = '^0.5.2', optional = true } -twilio = { version = "^6.33", optional = true } +django-two-factor-auth = { version = "^1.9", extras = [ "YubiKey", "phonenumbers", "Call", "SMS" ] } [tool.poetry.extras] ldap = ["django-auth-ldap"] -2fa-twilio = ["twilio"] -2fa-yubikey = ["django-otp-yubikey"] [tool.poetry.dev-dependencies] sphinx = "^2.1"