WIP: Enrollement MFA avec TOTP

This commit is contained in:
William Bouzourène 2024-12-21 21:54:51 +01:00
parent 274a30480e
commit 53c94a490c
Signed by: bouzoure
SSH key fingerprint: SHA256:19MbXpLua4rUtk8tunMesD8KUKb91LXLHg8E/qTooww
10 changed files with 144 additions and 1 deletions

View file

@ -13,6 +13,8 @@ html(lang="fr", data-bs-theme="dark")
body
| {{embed}}
script(src="/static/jquery/jquery.min.js")
script(src="/static/bootstrap/js/bootstrap.bundle.min.js")
script(src="/static/feather/dist/feather.min.js")
script feather.replace();
script feather.replace();
script(src="/static/events.js")

24
views/totp_enroll.pug Normal file
View file

@ -0,0 +1,24 @@
include partials/header.pug
.container
#login-card.my-5
.card
.card-header
| Vérification multifacteur (TOTP)
.card-body
if .MfaError
.alert.alert-danger
| #{.MfaError}
#totp-enroll-image.text-center.my-3
img(data-image=.QrCode)
form#login(method="post")
.mb-3
label.form-label(for="secret") Secret (si pas possible de scanner le code QR)
input#secret.form-control(type="text", value!=.Secret, disabled)
.mb-3
label.form-label(for="otp") Code temporaire
input#otp.form-control(type="text", required, name="otp", placeholder="000000" pattern="[0-9]{6}")
.mt-3.text-end
button.btn.btn-primary(type="submit")
i.me-2(data-feather="check-circle")
| Vérifier