Skip to main content

Turn on the authenticator app and backup codes

ADMIN GUIDE

Enrol your superuser account in an authenticator app, save backup codes, and recover when you lose both.

Who this guide is for

Superusers. This page protects your own superuser account.

Why it matters

A password alone lets anyone who steals it into the admin screen. A second factor stops that. The backup codes are shown once.

What you will do, in one sentence

Open Security (2FA), enter your password, add the key to your app, confirm the first code, and save the backup codes.

Screens are captured from a seeded test system. Every name, address and number on the screens is invented. Prepared 15 November 2026.

1. Enrol your account​

Open Settings, then Security (2FA). The page is titled Two-factor authentication (authenticator app). Enrolling is optional and affects only your own account.

The security page before enrolment.The security page before enrolment.
The security page before enrolment.
  1. Type your Current password.
  2. Choose Set up authenticator app.
  3. The page shows a Setup key and an otpauth URI. It draws no QR code.
  4. In your authenticator app, choose to enter a setup key, and paste the Setup key. Or open the URI on your phone.
  5. Type the First 6 digit code the app shows.
  6. Choose Confirm and enable.

A toast says Authenticator app enabled. Cancel abandons a half-finished set-up.

2. Save the backup codes​

After you confirm, the page shows ten backup codes in a yellow box.

The backup codes appear only once

Choose Copy and store them in a password manager or print them. Choose I saved them only after you have done that. Each code works one time. If you lose the app and the codes, you cannot sign in.

From now on, password sign-in asks for Authenticator or backup code after the password. Passkey sign-in is not affected.

3. Regenerate or disable​

When enrolled, the page says Authenticator app is enabled and shows the number of unused backup codes.

ActionWhat to typeResult
Regenerate (under Regenerate backup codes)An authenticator code. A backup code is not accepted here.New codes. The old ones stop working.
Disable authenticator app (under Disable)An authenticator code or a backup code.Removes the enrolment.

Sign-in codes are limited to a few tries in a short time. Wait a few minutes after repeated mistakes.

4. Recover when you are locked out​

Someone with shell access to the server can remove the enrolment. They run the command superuser totp-disable with your email address, for example [email protected]. You then sign in with the password alone and enrol again.

For accounts in other auth collections, the enrolment is API only. The admin screen has no page for it. A signed-in account calls these routes on its own collection:

GET /api/collections/users/totp
POST /api/collections/users/totp/begin
POST /api/collections/users/totp/confirm
POST /api/collections/users/totp/disable
POST /api/collections/users/totp/backup-codes
curl -X POST https://auth.example.org/api/collections/users/totp/begin \
-H "Authorization: $TOKEN" -H "Content-Type: application/json" \
-d '{"password": "current-password"}'

5. Quick reference card​

Enrol​

  1. Security (2FA), Current password.
  2. Set up authenticator app.
  3. Paste the setup key. Type the first code.
  4. Confirm and enable. Save the backup codes.

Lost the app​

  1. Sign in with a backup code.
  2. Or ask the server operator to run superuser totp-disable.

Backup codes are shown once. Store them away from the server.