hanyuu/templates/auth/login-tfa.twig

35 lines
1.3 KiB
Twig

{% extends 'auth/master.twig' %}
{% block content %}
<form class="auth-login" method="post" action="/login/tfa">
<div class="auth-avatar">
<div class="auth-avatar-image">
<img src="//flashii.net/assets/avatar/{{ user_info.id }}?res=200" alt="">
</div>
</div>
<div class="auth-fields">
<label class="auth-input">
<div class="auth-input-title">
Username
</div>
<div class="auth-input-value">
<input type="text" value="{{ user_info.name }}" readonly>
</div>
</label>
</div>
<div class="auth-buttons">
{% if 'totp' in auth_method_names %}
<a href="/login/tfa/totp" class="auth-button auth-button-primary">Authenticator app (TOTP)</a>
{% endif %}
{% if 'u2f' in auth_method_names %}
<a href="/login/tfa/u2f" class="auth-button auth-button-primary">Security key (U2F)</a>
{% endif %}
{% if 'backup' in auth_method_names %}
<a href="/login/tfa/backup" class="auth-button auth-button-primary">Backup code</a>
{% endif %}
<a href="/login" class="auth-button">Cancel</a>
</div>
</form>
{% endblock %}