{# The multi-factor authentication initialization template. Display a QR-code and the OTP secret. :param secret: The OTP secret. :type secret: :class:`str` :param qr_image: A QR-code image representing the OTP secret. :type qr_image: A base64 encoded :class:`str` #} {% 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 script %} {% endblock %} {% block submenu %} {% trans %}Personal information{% endtrans %} {% trans %}Account settings{% endtrans %} {% endblock %} {% block container %}
{% if not g.session %}
{% endif %} {% block header %} {% if not g.session %} {% if logo_url %} {{ website_name }} {% else %} {% endif %}

{{ _("Sign in as %(username)s", username=g.auth.user_name) }}
{% trans %}Set up multi-factor authentication.{% endtrans %}

{% else %}

{% trans %}Set up multi-factor authentication.{% endtrans %}

{% endif %} {% endblock %} {% block messages %} {{ flask.messages() }} {% endblock %}
{% trans %}Authenticator application configuration{% endtrans %}
{% trans %}You need to install an authenticator application to generate one-time passcodes for {{ website_name }}.{% endtrans %} {% trans %}Then, configure the authenticator application with one of the following methods:{% endtrans %}

{% trans %}1 - Automatic configuration{% endtrans %}

{% trans %} If the authenticator application is installed on the device that you are currently using, you can configure it by clicking on this button: {% endtrans %}

{% trans %}2 - QR Code scanning{% endtrans %}

{% trans %} If the previous button did not work or if your authenticator application is installed on another device, please open it and use it to scan the following qrcode: {% endtrans %}
{% trans %}Secret token{% endtrans %}

{% trans %}3 - Secret token{% endtrans %}

{% trans %} If your device cannot scan images, you can configure your authenticator application by manually copying this secret token: {% endtrans %}
{% trans %}Passcode confirmation{% endtrans %}
{% trans %} Once your authenticator application is correctly configured, you need to generate a one-time passcode and fill it in the form below.{% endtrans %}
{% call fui.render_form(form, hx_boost="false") %} {% block fields %} {{ login_field.render_field(form.otp, class="autofocus") }} {% endblock %} {% block buttons %}
{% if not g.session %} {% endif %}
{% endblock %} {% endcall %}
{% if not g.session %}
{% endif %}
{% endblock %}