{% extends "base.html" %} {% from "macros.html" import icon, btn, badge %} {% block title %}{{ t('Enable 2FA') }}{% endblock %} {% block content %}
{# Step 1 — QR code #}
1 {{ t('Scan the QR code') }}
{{ t('QR code') }}

{{ t('Scan this image with an authenticator app like Google Authenticator, Authy, or 1Password to connect your account.') }}

{{ t('Unable to scan?') }}

{{ t('You can manually enter this secret key into your app:') }}

{{ secret }}
{# Step 2 — Verify #}
{{ request.csrf_input() }}
2 {{ t('Verify Setup') }}

{{ t('Confirm the setup by entering the 6-digit code currently displayed in your authenticator app.') }}

{{ form.code.input(placeholder='000 000', autofocus=True, inputmode='numeric', pattern='[0-9]{6}', maxlength='6', style='font-size:1.5rem; letter-spacing:0.3em; text-align:center; height:56px; color:var(--brand); font-weight:700') }} {% if form.code.error %}
{{ icon('x', 14) }} {{ form.code.error }}
{% endif %}
{% endblock %}