{{define "title"}}Two-Factor Authentication{{end}} {{define "content"}}

Two-Factor Authentication

{{ $User := .CurrentUser }}
{{if .TwoFactor.Enabled}}

Two-Factor status: Enabled!

When you next log in to your account, you will need your Authenticator App handy to produce the time-limited six-digit code to log in.

Backup Codes

In case you lose access to your Authenticator App, please print off or write down these backup codes which will allow you to re-gain access to your {{PrettyTitle}} account. Each of these codes may be used one time in response to your 2FA Authenticator prompt at login.

{{range .TwoFactor.GetBackupCodes}}
{{.}}
{{end}}

If you would like to re-generate these backup codes, click on the button below. This may be useful if you have needed to log in using these codes (which are one-time use only) and wish to generate a fresh set of backup codes. Note that re-generating new codes will cause the old ones to no longer work!

{{InputCSRF}}

Disable Two-Factor Auth

If you wish to disable two-factor authentication for your account, please enter your account password for verification and click on the button below.

{{InputCSRF}}
{{end}} {{if not .TwoFactor.Enabled}}

Two-Factor status: Disabled!

Set up your Authenticator App

To set up Two-Factor Auth, you'll need to download and install a compatible Authenticator App on your device. Some suggestions for apps that are compatible with {{PrettyTitle}} are as follows:

  • Google Authenticator: for Android or iOS
  • Authy: available for Android and iOS as well as Windows, macOS and Linux computers.

Add {{PrettyTitle}} to your Authenticator App

When you have your Authenticator App ready, click on its "Add a new site" button and scan the following QR code to enroll your device for {{PrettyTitle}}:

{{ToHTML .QRCode}}

Alternatively (if you can't scan the QR code), you may copy and paste this secret text in to your Authenticator app:

Test your Authenticator App

After scanning the QR code (or copying the secret key) into your Authenticator app, you should be able to generate temporary six-digit authentication codes.

Test that you have enrolled your authenticator correctly by entering the current six-digit code below:

{{InputCSRF}}
{{end}}
{{end}} {{define "scripts"}} {{end}}