feat: two-factor sign-in, required for sensitive permissions
Pull request / title (pull_request) Successful in 2s
CI / test (pull_request) Successful in 1m11s
CI / image (apps/api/Dockerfile, t5de-hub-api) (pull_request) Skipped
CI / image (apps/web/Dockerfile, t5de-hub-web) (pull_request) Skipped

Better Auth's twoFactor plugin: an authenticator app (TOTP) with 10 backup codes.
Turning it on, making new backup codes and turning it off are on the account page,
and signing in asks for a code once it's on. Sensitive permissions (product:remove,
person:ban, person:role, settings:edit, catalog:suspend, ...) answer 403
two_factor_required without it, API tokens included; the console reminds people
who need it. Better Auth's own admin endpoints are closed (404).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
dhkatzandClaude Opus 5.5 committed 2026-11-05 19:17:46 -08:00
1 parent 69c55a72fb
commit d5bc792190
28 files changed
+4365 -62

No files matched your search

+2 -2
View File
@@ -478,8 +478,8 @@ Phases for products, catalogs and imports (products.md, console.md, imports.md):
(to look into with the importer spike).
3. Cases (reports, appeals, reviews), file blocks and the catalogs' changes feed; notifications; API tokens;
two-factor sign-in for sensitive permissions. Cases and notifications **done** (2026-11-05), without email, canned
reasons, moderator notes or second approval. File blocks and API tokens **done** (2026-11-05); two-factor
sign-in next.
reasons, moderator notes or second approval. File blocks, API tokens and two-factor sign-in **done**
(2026-11-05); auditing turning two-factor on and off, and "trust this browser", later.
4. Imports: grants, recorded grants, requests, unclaimed creators, the job queue, `t5de-importer` (after its spike).
5. Charts and stats; mirroring between catalogs.