diff --git a/modoboa/core/views/auth.py b/modoboa/core/views/auth.py index e1c4ed06c..d9eaa157e 100644 --- a/modoboa/core/views/auth.py +++ b/modoboa/core/views/auth.py @@ -276,6 +276,9 @@ class TwoFactorCodeVerifyView(LoginViewMixin, generic.FormView): has_totp_device = django_otp.user_has_device(self.user) context["totp_device"] = has_totp_device context["webauthn_device"] = self.user.webauthn_enabled + context["show_method_selection"] = ( + has_totp_device and self.user.webauthn_enabled + ) context["nextlocation"] = self.request.POST.get( "next", self.request.GET.get("next") ) diff --git a/modoboa/templates/registration/login.html b/modoboa/templates/registration/login.html index e9061d3aa..c93b3bf76 100644 --- a/modoboa/templates/registration/login.html +++ b/modoboa/templates/registration/login.html @@ -44,11 +44,14 @@ {% block extra_js %} {% endblock %} diff --git a/modoboa/templates/registration/password_reset_confirm.html b/modoboa/templates/registration/password_reset_confirm.html index de3f83f71..6a0c0aa5b 100644 --- a/modoboa/templates/registration/password_reset_confirm.html +++ b/modoboa/templates/registration/password_reset_confirm.html @@ -12,6 +12,7 @@ {% render_field form.new_password1 %}