{# The multi-factor authentication code verification template. Displays a form that asks for the multi-factor authentication code. :param form: The code verification form. :type form: :class:`~canaille.core.endpoints.forms.TwoFactorForm` :param username: The username of the user attempting to log-in. :type username: :class:`str` :param method: The authentication factor method. :type method: :class:`str` (*TOTP*, *HOTP*, *EMAIL_OTP*, *SMS_OTP*) #} {% extends theme('base.html') %} {% import 'macro/flask.html' as flask %} {% import 'macro/form.html' as fui %} {% import 'core/partial/login_field.html' as login_field %} {% block container %}
{% block header %} {% if logo_url %} {{ website_name }} {% else %} {% endif %}

{{ _("Sign in as %(username)s", username=username) }}
{% trans %}One-time password authentication.{% endtrans %}

{% endblock %} {% block messages %} {{ flask.messages() }} {% endblock %} {% call fui.render_form(form, hx_boost="false") %} {% block fields %} {{ login_field.render_field(form.otp, class="autofocus") }} {% endblock %} {% block buttons %} {% endblock %} {% endcall %} {% if method == "EMAIL_OTP" or method == "SMS_OTP" %} {% if method == "EMAIL_OTP" %}
{% endif %} {% if method == "SMS_OTP" %} {% endif %}
{% endif %}
{% endblock %} {% block script %} {% endblock %}