Require two-factor authentication for admins and supervisors

Admins and supervisors without 2FA are sent a code at their next login,
and verifying it turns 2FA on. They can change the channel but not turn
it off. Older sessions without 2FA are rejected with TWO_FACTOR_REQUIRED,
and promoting a user ends their sessions so they enrol at next login.
The requirement is skipped when no email or WhatsApp channel can deliver
a code, and TWO_FACTOR_REQUIRED_ROLES=false switches it off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-19 11:00:12 +02:00
co-authored by Claude Opus 5.5
parent 12832dea67
commit 3f3a8cad66
21 changed files with 356 additions and 55 deletions
+1 -1
View File
@@ -58,7 +58,7 @@ It runs in any web browser — on a phone, tablet, or computer — with nothing
- **Your branding** — your logo, colours, and name on the website, emails, invoices, receipts, and reports.
- **Privacy** — Terms of Use and Privacy Policy pages filled in with your details, and members can close their account or have their personal data removed.
- **Security** — optional two-step login codes by email or WhatsApp, protection against password-guessing, a record of each account's recent logins, and the ability to sign out on all devices.
- **Security** — two-step login codes by email or WhatsApp (required for admins and supervisors, optional for members), protection against password-guessing, a record of each account's recent logins, and the ability to sign out on all devices.
- **Help on every page** — a "Need help?" button explains each page in plain language.
---