mirror of
https://github.com/Vateron-Media/XC_VM.git
synced 2026-10-30 19:03:25 +01:00
A TOTP code from an authenticator app (RFC 6238), or one of ten one-time recovery codes, after the password. Each user turns it on from the profile page (a QR code drawn in the browser, never by a QR service); a group can require it, and a member without it sets it up at the next sign-in. A sign-in that needs a code is held: the session keys the password wrote are moved aside until a good code, so no page sees a signed-in session before it. A code is good once (users_2fa.last_step), recovery codes are stored as hashes and spent on use, and ten wrong codes in 15 minutes lock the account's second step; wrong codes count toward the login flood limit. An admin turns it off for a user who lost the app, or root runs `console.php tools twofactor <username>`.