feat(auth): split auth — magic-link for customers, email+password for support agents (v0.3.0) #4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
Industry-standard ticketing tools (Zendesk, Intercom, Help Scout, Linear customer portal) all split auth by role:
v0.2.0 ships with magic-link for everyone (current Phase 3 / D-04 / D-06 design). It's correct and secure but creates a daily-email papercut for support agents that compounds. v0.3.0 closes that gap.
Sequencing — depends on #5 (Phase 18)
This is Phase 20 in the roadmap, gated by #5 (Phase 18) for the security-row spec matrix. Reason: auth is the highest-stakes feature; the freezone-pattern checklist gives us a "Section AU: auth" row matrix where every claim ("password rotated revokes session" / "rate-limit kicks in after 5 fails" / "magic-link single-use") has a Schema/Wired/MCP/Browser/Human row. B.5 adversarial review must run on the design before any code lands.
Deliverables
user_credentialstable; argon2id hashing; new RPCsauth.login/auth.create_password(admin-only) /auth.change_password/auth.reset_password_request/auth.reset_password_consume; session-cookie management (sliding window,HttpOnly/Secure/SameSite=Strict); login-failure rate-limiting (per-email + per-IP)._ui_wasm: new/loginroute with email+password form (separate from/enroll); role-aware sign-in CTA — "Customer? Get a sign-in link." vs "Support agent? Log in."; password-reset flow.role: "agent"or"admin"get a "set your password" prompt on next sign-in. Customers stay on magic-link untouched.D-XX-auth-split.md— dual-path architectureD-XX-password-storage.md— argon2id parameters, salt strategy, work factorOut of scope (later releases)
Risk markers
Dependencies
Estimated effort
3-4 sessions
Closing this as wrong scope for hero_assistance after a re-evaluation in session 24.
The original framing ("industry-standard ticketing tools split auth by role") was an unexamined SaaS-pattern import. hero_assistance isn't a SaaS — it's a Hero-stack component:
400::/7). That's mTLS-equivalent without cert management.The honest v0.3.0+ auth answers, when a real customer deployment surfaces a real gap, are:
device_addr) — one-session feature when the daily papercut becomes realAuthorization: Bearer <host-jwt>validated against configurable JWKS; no magic-link in the embed pathNone of these are needed for v0.2.0 or v0.3.0 in the abstract. They get filed as precise issues when a real customer deployment requires them. Per the project's "anchor on stated specs" guideline (
feedback_scope_discipline.md), we don't pre-build auth subsystems for imagined requirements.Magic-link-for-everyone (current behaviour) is the answer indefinitely. No "auth split" phase. The roadmap reduces to Phase 18 (spec docs, #5) + Phase 16b (visual polish, #2) + Phase 19 (E2E test suite, #3) for v0.2.0 → v1.0.
Refs: D-04, D-05, D-09, decisions/D-18-spec-as-checklist.md (Section J of the e2e_checklist will document the three candidate v0.3.0+ paths so the discussion is preserved without committing to an implementation).