Session status
GET /api/auth
- Auth – optional.
- Response –
{ status: "ok" | "email_not_verified" | "2fa_required", auth }whereauthechoes the JWT payload ornull.
Account lifecycle
Email verification
Password reset
Two-factor authentication (TOTP)
All endpoints require an email-verified session.POST /api/auth/2fa/enable/request→{ status: "2fa_setup", url, secret }.urlis a TOTP URI you can render as a QR code.POST /api/auth/2fa/enable/submitwith{ token }confirms setup and issues a fresh cookie.POST /api/auth/2fa/verifywith{ token }completes login whenstatus === "2fa_required".POST /api/auth/2fa/resetwith{ token }rotates the 2FA secret and re-enters the"2fa_setup"state.
External providers
All external flows set or clear the
openid_code and openid_state cookies automatically. After a successful redirect, the user is taken to /dashboard unless you specify a different returnUrl inside your email templates.