Open xi opened 1 year ago
These are notes for migration. I will update this comment as I find out more.
django-two-factor-auth[phonenumberslite,webauthn]
as a dependencyINSTALLED_APPS
:
'django_otp',
'django_otp.plugins.otp_static',
'django_otp.plugins.otp_totp',
'two_factor',
'two_factor.plugins.webauthn',
'django_otp.middleware.OTPMiddleware'
to MIDDLEWARE
(after django.contrib.auth.middleware.AuthenticationMiddleware
)TWO_FACTOR_WEBAUTHN_RP_NAME
(replaces MFA_DOMAIN
)path('', include('two_factor.urls'))
two_factor/
Other notes
phonenumbers
. What is worse, it requires an outdated version.I love django-two-factor-auth and this is the best approach for a traditional django implementation.
Unfortunately if a legavy and enterprise level authentication system preexists, based on django and with SAML2 or OAuth2 or OpenID Connect, it is more difficult to get a good integration with an MFA without huge reworking and developments impacts.
I have tested all the mature MFA libraries ready for django and I found in django-mfa3 the best code and the most flexible and impactless approach, then I have decided to use this (and helping developments as well) for my SAML2 and OpenID Connect (Identity) Providers.
simplicity is a feature, code readability is a value, quick and smart interaction with the authors is unvaluable. thank you @xi
Just to give you an example, this issue never got a formal answer https://github.com/jazzband/django-two-factor-auth/issues/641
I started this project in 2021 because I needed FIDO2 authentication for Django and there was no good library available. However, that changed. In January 2023, version 1.15.0 of django-two-factor-auth was released with FIDO2/WebAuthn support.
django-two-factor-auth is maintained by jazzband and much more popular than django-mfa3. So even though I like working on this library, I think it is the responsible thing to deprecate it.
Steps to do:
There is a small chance that after reviewing django-two-factor-auth I find out that the approaches are different enough so that it makes sense to keep both projects around. But honestly I don't think that will happen.