mirror of
https://github.com/netbirdio/netbird.git
synced 2026-05-14 04:39:54 +00:00
* wip: totp for local users * fix providers not getting populated * polished UI and fix post_login_redirect_uri * fix: make sure logout is only prompted from oidc flow Signed-off-by: jnfrati <nicofrati@gmail.com> * update templates Signed-off-by: jnfrati <nicofrati@gmail.com> * deps: update dex dependency Signed-off-by: jnfrati <nicofrati@gmail.com> * fix qube issues Signed-off-by: jnfrati <nicofrati@gmail.com> * replace window with globalThis on home html Signed-off-by: jnfrati <nicofrati@gmail.com> * fixed coderabbit comments Signed-off-by: jnfrati <nicofrati@gmail.com> * debug * remove unused config and rename totp issuer * deps: update dex reference to latest * add dashboard post logout redirect uri to embedded config * implemented api for mfa configuration * update docs and config parsing * catch error on idp manager init mfa * fix tests * Add remember me for MFA * Add cookie encryption and session share between tabs * fixed logout showing non actionable error and session cookie encription key * fixed missing mfa settings on sql query for account * fix code index for mfa activity --------- Signed-off-by: jnfrati <nicofrati@gmail.com> Co-authored-by: braginini <bangvalo@gmail.com>
45 lines
1.3 KiB
HTML
45 lines
1.3 KiB
HTML
{{ template "header.html" . }}
|
|
|
|
<div class="nb-card">
|
|
<h1 class="nb-heading">Two-factor authentication</h1>
|
|
{{ if not (eq .QRCode "") }}
|
|
<p class="nb-subheading">Scan the QR code below using your authenticator app, then enter the code.</p>
|
|
<div style="text-align: center; margin: 1em 0;">
|
|
<img src="data:image/png;base64,{{ .QRCode }}" alt="QR code" width="200" height="200"/>
|
|
</div>
|
|
{{ else }}
|
|
<p class="nb-subheading">Enter the code from your authenticator app.</p>
|
|
{{ end }}
|
|
|
|
<form method="post" action="{{ .PostURL }}">
|
|
{{ if .Invalid }}
|
|
<div class="nb-error">
|
|
Invalid code. Please try again.
|
|
</div>
|
|
{{ end }}
|
|
|
|
<div class="nb-form-group">
|
|
<label class="nb-label" for="totp">One-time code</label>
|
|
<input
|
|
type="text"
|
|
id="totp"
|
|
name="totp"
|
|
class="nb-input"
|
|
inputmode="numeric"
|
|
pattern="[0-9]*"
|
|
maxlength="6"
|
|
autocomplete="one-time-code"
|
|
placeholder="000000"
|
|
autofocus
|
|
required
|
|
>
|
|
</div>
|
|
|
|
<button type="submit" id="submit-login" class="nb-btn">
|
|
Verify
|
|
</button>
|
|
</form>
|
|
</div>
|
|
|
|
{{ template "footer.html" . }}
|