Two-Factor Authentication
Two-factor authentication is the twoFactor switch in config/auth.ts (on by default in the installer’s question 6). Users turn it on in two steps (get a secret, then confirm with a 6-digit code), so nobody locks themselves out, and they receive 10 single-use recovery codes, shown once. Each authenticator code works only once, “remember this device” skips the code for 30 days on one browser, and the secret is stored encrypted. A passkey also answers the second step. Turning it on or off needs a recent password confirmation.
The Authentication page already covers the whole flow, with requests and responses. It is proven in the auth prototype (spike 20) and not released yet.