api-server exposes three authentication patterns:
- API keys for machine-to-machine access through
X-API-Key - JWT bearer tokens returned by
POST /auth/loginandPOST /auth/refresh - Browser-based OAuth through
GET /auth/googleandGET /auth/github
Recommended Header Patterns
- API Key
- JWT
Local Login
POST /auth/login uses the local auth strategy and accepts:
usernamepassword
accessToken, refreshToken, and a user payload.
API Keys
API keys are created withPOST /auth/api-keys and then validated automatically by JwtAuthGuard when the request includes X-API-Key.
OAuth And TOTP
GET /auth/googleandGET /auth/githubstart browser-based OAuth flows.- If TOTP is enabled for the user, the API exposes
/auth/totp/setup,/auth/totp/verify,/auth/totp/verify-setup, and/auth/totp/disable. - Workspace-scoped Google integrations are managed separately under
/workspaces/{workspaceId}/oauth-connections/google.