{% extends "account-base.html" %} {% from "ui.html" import csrf_field, copyable with context %} {% macro setup() -%}

{{ _("Set up two-factor authentication") }}

  1. {{ _("Open your authenticator app (Google Authenticator, Aegis, 1Password, Bitwarden…) and scan this QR code.") }}
    {{ qr }}

    {{ _("Cannot scan it? Type this key in the app instead:") }} {{ copyable("totp-key", key) }}

  2. {{ _("Type the six-digit code the app now shows for Synaptane.") }}
{% if error %}{% endif %}
{{ csrf_field() }}
{% if not forced %}{{ _("Cancel") }}{% endif %}
{%- endmacro %} {% block forced %}

@{{ user.username }}

{{ _("Two-factor authentication") }}

{{ _("Super admins must confirm each sign-in with a code from an authenticator app. Set it up to continue.") }}

{{ setup() }}
{{ csrf_field() }}{{ _("Not your account?") }}
{% endblock %} {% block section %}{{ setup() }}{% endblock %}