Sessions
Tokens are random, stored as SHA-256 hashes, and expire.
Security
Hashed passwords, hashed session tokens, CSRF on mutating routes, workspace authorization, and localhost-only production binds.
Tokens are random, stored as SHA-256 hashes, and expire.
Cookie plus header comparison on state-changing API calls after login.
Workspace and conversation membership is checked on the server.
DATABASE_URL and provider keys stay in VPS env files, never NEXT_PUBLIC_*.
Production API binds 127.0.0.1:3033. PostgreSQL is not exposed publicly.