Files
surveybox/surveybox/web/templates/totp_setup.html
T
marco.morath 42dd1f2d4a
CI / audit (push) Skipped
CI / checks (push) Failing after 37s
CI / image (push) Skipped
Initial Commit: Status Testing
2026-11-25 18:46:04 +01:00

29 lines
1.5 KiB
HTML

{% extends "base.html" %}
{% block title %}{{ _('Set up authenticator app') }} · {{ appearance.name }}{% endblock %}
{% block content %}
<section class="card narrow">
<h1>{{ _('Set up authenticator app') }}</h1>
<ol class="steps">
<li>{{ _('Open an authenticator app on your phone, for example Aegis, 2FAS, FreeOTP or the one built into your password manager.') }}</li>
<li>{{ _('Scan this QR code. If that does not work, enter the key below by hand.') }}</li>
<li>{{ _('Enter the 6-digit code the app shows.') }}</li>
</ol>
<div class="qr">{{ qr_svg | safe }}</div>
<p class="secret"><code>{{ secret_display }}</code></p>
{% if error %}<p class="alert error" role="alert">{{ _(error) }}</p>{% endif %}
<form method="post" action="/account/totp" class="form">
{{ csrf_field(request) }}
<input type="hidden" name="sealed" value="{{ sealed }}">
<label for="code">{{ _('Code from the app') }}</label>
<input id="code" name="code" type="text" inputmode="numeric" autocomplete="one-time-code" required maxlength="16" autofocus>
{% if user.password_hash %}
<input type="text" name="username" autocomplete="username" value="{{ user.email }}" hidden readonly>
<label for="current_password">{{ _('Current password') }}</label>
<input id="current_password" name="current_password" type="password" autocomplete="current-password" required maxlength="1024">
{% endif %}
<button type="submit">{{ _('Turn on') }}</button>
</form>
</section>
{% endblock %}