| 1 |
{% extends "base.html" %} |
| 2 |
|
| 3 |
{% block title %}Two-Factor Authentication - Makenotwork{% endblock %} |
| 4 |
|
| 5 |
{% block body_attrs %} class="centered-page"{% endblock %} |
| 6 |
|
| 7 |
{% block content %} |
| 8 |
<h1 class="brand-h1">Makenot<span class="dot">.</span>work</h1> |
| 9 |
<div class="login-container"> |
| 10 |
{% if let Some(err) = error %} |
| 11 |
<div class="alert alert-error mb-4">{{ err }}</div> |
| 12 |
{% endif %} |
| 13 |
|
| 14 |
<form class="login-form" |
| 15 |
hx-post="/auth/verify-2fa" |
| 16 |
hx-target="closest .login-container" |
| 17 |
hx-swap="outerHTML" |
| 18 |
hx-indicator="#twofa-spinner"> |
| 19 |
<h2 class="subtitle-h2">Two-Factor Authentication</h2> |
| 20 |
<p class="muted mb-4 text-sm"> |
| 21 |
Enter the 6-digit code from your authenticator app, or use a backup code. |
| 22 |
</p> |
| 23 |
<div class="form-group"> |
| 24 |
<label for="code">Verification Code</label> |
| 25 |
<input |
| 26 |
type="text" |
| 27 |
id="code" |
| 28 |
name="code" |
| 29 |
placeholder="000000" |
| 30 |
required |
| 31 |
autofocus |
| 32 |
autocomplete="one-time-code" |
| 33 |
inputmode="numeric" |
| 34 |
pattern="[a-zA-Z0-9]*" |
| 35 |
maxlength="8" |
| 36 |
/> |
| 37 |
</div> |
| 38 |
|
| 39 |
<button type="submit" class="btn-primary"> |
| 40 |
Verify |
| 41 |
<span id="twofa-spinner" class="htmx-indicator"> ...</span> |
| 42 |
</button> |
| 43 |
|
| 44 |
<div class="foot-link"> |
| 45 |
<a href="/login">Back to login<span class="dot">.</span></a> |
| 46 |
</div> |
| 47 |
</form> |
| 48 |
</div> |
| 49 |
{% endblock %} |
| 50 |
|