diff --git a/allauth_ui/templates/mfa/authenticate.html b/allauth_ui/templates/mfa/authenticate.html new file mode 100644 index 0000000..ad913e3 --- /dev/null +++ b/allauth_ui/templates/mfa/authenticate.html @@ -0,0 +1,38 @@ +{% extends "mfa/authenticate.html" %} +{% load allauth %} +{% load allauth_ui %} +{% load i18n %} +{% block content %} + {% trans "Two-Factor Authentication" as heading %} + {% blocktranslate asvar subheading %}Your account is protected by two-factor authentication. Please enter an authenticator code:{% endblocktranslate %} + {% url 'mfa_authenticate' as action_url %} + {% #container heading=heading subheading=subheading %} + {% translate "Activate" as button_text %} + {% trans "Sign In" as button_text %} + {% #form form=form url=action_url button_text=button_text %} + {% csrf_token %} + {% /form %} + {% if "webauthn" in MFA_SUPPORTED_TYPES %} +
+

{% translate "Alternative options" %}

+ {% #form form=webauthn_form url=action_url use_default_button="false" %} + + {% trans "Cancel" %} + {% csrf_token %} + {% /form %} + {% endif %} + {% /container %} + {{ js_data|json_script:"js_data" }} + {% include "mfa/webauthn/snippets/scripts.html" %} + {# djlint:off #} + + {# djlint:on #} +{% endblock content %} diff --git a/pyproject.toml b/pyproject.toml index 2bbed57..23e39f0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "django-allauth-ui" -version = "1.3.1" +version = "1.3.1b2" description = "" authors = ["Dani Hodovic "] license = "MIT" diff --git a/tests/settings.py b/tests/settings.py index e085c91..705c7ab 100644 --- a/tests/settings.py +++ b/tests/settings.py @@ -119,3 +119,4 @@ USERSESSIONS_TRACK_ACTIVITY = True MFA_SUPPORTED_TYPES = ["totp", "webauthn", "recovery_codes"] +MFA_TOTP_ISSUER = "AllAuth UI"