Auth
Registration, login session, and workspace bootstrap for new organizations.
Key APIs
| Method | Path | Purpose |
|---|---|---|
| POST | /v1/auth/signup | Email/password signup and new workspace |
| POST | /v1/auth/signup/google | Google signup and new workspace |
| POST | /v1/auth/verify-email | Confirm email after client verifies with Firebase |
| POST | /v1/auth/resend-verification | Resend verification email |
| GET | /v1/auth/me | Current user and organization |
| POST | /v1/auth/logout | Revoke refresh tokens |
Business Rules
- First user in a new workspace is admin and active; organization slug is generated uniquely.
- Signup creates the organization, user, Firebase account, and grants trial credits when enabled.
- Resend verification always returns the same message (no email enumeration).
Dependencies
- Firebase Admin (users, tokens, verification)
- Credits module (trial grant on signup)