Identity
Auth and session model
Account lifecycle work is treated as core product behavior, not as a single happy-path sign-in form.
- Auth.js credentials auth uses JWT sessions carrying user ID, verification state, and session version.
- proxy.ts protects /app/* and redirects both unauthenticated and unverified users before dashboard routes render.
- Email verification, password reset, change email, change password, and scheduled delete/restore flows each have dedicated handling.
- Passwords use Argon2id; auth tokens are 32-byte random values stored only as HMAC-SHA-256 hashes with single-use expiry semantics.
Inspect In Repo