dragonflight/services/web-ui
Zac fff0828d79 feat(mam-api,web-ui): TOTP two-factor authentication
Optional time-based 2FA on top of password login. TOTP core is hand-rolled
on node:crypto (RFC 6238) — no runtime dep — and verified against the RFC
test vectors.

- migration 027: users.totp_secret/totp_enabled + user_recovery_codes
- src/auth/totp.js: base32, secret gen, RFC 6238 verify, otpauth URI,
  recovery codes
- src/auth/mfa-tickets.js: short-lived single-use tickets bridging the two
  login steps (in-memory, single-instance like the rate-limiter)
- auth routes: /totp/setup, /totp/enable (returns recovery codes once),
  /totp/disable (password-confirmed); login returns {mfa_required, ticket}
  when enabled, /login/totp completes with a code or recovery code
- /auth/me and loadUser surface totp_enabled
- web-ui: login second-factor step; Settings -> Account TOTP enroll (QR +
  manual secret + recovery codes + disable)
- qrcode added as an optional dep; setup degrades to manual entry if absent
- tests: totp unit (RFC vectors) + integration (enable/login/recovery/disable)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-30 02:42:57 +00:00
..
public feat(mam-api,web-ui): TOTP two-factor authentication 2026-05-30 02:42:57 +00:00
scripts chore: 1.2 ship-prep sweep — close 38 issues 2026-05-27 02:06:14 +00:00
src/css rebrand: Dragonflight — ember orange accent (hue 266→32) 2026-05-21 22:16:32 -04:00
.dockerignore add services/web-ui/.dockerignore 2026-04-07 21:58:21 -04:00
.gitignore web-ui: fix corrupted .gitignore from earlier patch 2026-05-21 12:31:18 -04:00
Dockerfile chore: 1.2 ship-prep sweep — close 38 issues 2026-05-27 02:06:14 +00:00
nginx.conf fix(web-ui): forward X-Forwarded-Proto from outer proxy so mam-api emits Set-Cookie 2026-05-27 22:11:27 -04:00
package.json chore: 1.2 ship-prep sweep — close 38 issues 2026-05-27 02:06:14 +00:00
postcss.config.js web-ui: fix wave-1 build pipeline (primitives missing from bundle) 2026-05-21 16:41:55 +00:00
tailwind.config.js web-ui: fix wave-1 build pipeline (primitives missing from bundle) 2026-05-21 16:41:55 +00:00