dkforest

A forum and chat platform (onion)
git clone https://git.dasho.dev/n0tr1v/dkforest.git
Log | Files | Refs | LICENSE

two-factor-authentication-verify.gohtml (2328B)


      1 {{ define "content" }}
      2     <div class="container mt-3 mb-5">
      3         <h3>{{ t "1- Recovery code" . }}</h3>
      4         <p>{{ t "Recovery code is used to access your account in the event you cannot receive two-factor authentication codes." . }}</p>
      5         <h1><span style="background-color: black; color: black;">{{ .Data.RecoveryCode }}</span></h1>
      6         <p>
      7             <b>{{ t "Treat your recovery codes with the same level of attention as you would your password!" . }}</b>
      8             {{ t "We recommend saving them with a password manager such as Lastpass, 1Password, or Keeper." . }}
      9         </p>
     10         <h3>{{ t "2- Scan this barcode with your app." . }}</h3>
     11         <p>{{ t "Scan the image above with the two-factor authentication app on your phone." . }}</p>
     12         <p><img src="data:image/png;base64,{{ .Data.QRCode }}" class="img-thumbnail" /></p>
     13         <p>If you cannot scan the code, enter the secret <span style="background-color: black; color: black;">{{ .Data.Secret }}</span> into your app.</p>
     14         <h3>{{ t "3- Enter the six-digit code from the application" . }}</h3>
     15         <p>{{ t "After scanning the barcode image, the app will display a six-digit code that you can enter below." . }}</p>
     16         <form method="post">
     17             <input type="hidden" name="csrf" value="{{ .CSRF }}" />
     18             <div class="form-group">
     19                 <input type="text" name="code" class="form-control" placeholder="123456" style="{{ if .Data.Error }}is-invalid{{ end }}" autocomplete="off" maxlength="6" />
     20                 {{ if .Data.Error }}<div class="invalid-feedback d-block">{{ .Data.Error }}</div>{{ end }}
     21             </div>
     22             <div class="form-group">
     23                 <input type="password" name="password" value="{{ .Data.Password }}" class="form-control" placeholder="Current password" style="{{ if .Data.ErrorPassword }}is-invalid{{ end }}" autocomplete="off" autocapitalize="none" />
     24                 {{ if .Data.ErrorPassword }}<div class="invalid-feedback d-block">{{ .Data.ErrorPassword }}</div>{{ end }}
     25             </div>
     26             <div class="form-group">
     27                 <button class="btn btn-success">{{ t "Enable" . }}</button>
     28                 <a href="/settings/account" class="btn btn-secondary">{{ t "Cancel" . }}</a>
     29             </div>
     30         </form>
     31     </div>
     32 {{ end }}