JWT authentication
All authenticated API endpoints require a Bearer token in theAuthorization header.
| Claim | Description |
|---|---|
sub | User ID |
email | User email address |
tenant_id | Tenant the request is scoped to |
roles | Array of roles assigned to the user |
iss | Must be causeflow |
aud | Must be causeflow-api |
exp | Token expiry — expired tokens are rejected |
401 Unauthorized.
Sign-in methods
CauseFlow supports three ways to authenticate:Email and password
Standard email/password sign-in backed by AWS Cognito. Passwords are never stored in plaintext.
Google OAuth
Sign in with your Google account via OAuth 2.0. No password required.
GitHub OAuth
Sign in with your GitHub account via OAuth 2.0. Useful for engineering teams already using GitHub.
API key authentication
API keys are used to authenticate webhook payloads from your monitoring tools. They are not intended for user-facing API calls. Creating an API key:- Go to Dashboard > Settings > API Keys.
- Click Create API key and give it a descriptive name.
- Copy the key immediately — it is shown in plaintext only once.
cflo_. Example:
Authorization header when configuring your monitoring tool:
Webhook HMAC-SHA256 verification
For monitoring tools that support request signing, CauseFlow verifies an HMAC-SHA256 signature over the raw request body. This ensures the webhook payload has not been tampered with in transit. Verification flow:X-Webhook-Signature header uses the format sha256=<hex digest>. CauseFlow uses a constant-time comparison to prevent timing attacks.
Public endpoints
The following endpoints do not require authentication:| Endpoint | Purpose |
|---|---|
GET /health | Simple health check |
GET /health/detailed | Detailed service health |
POST /v1/webhooks/:tenantId/:provider | Webhook ingestion (authenticated by API key, not JWT) |
GET /auth/github/callback | GitHub OAuth callback |
GET /auth/google/callback | Google OAuth callback |
| OAuth initiation flows | Sign-in redirects |
Session expiry
JWT tokens expire after a configurable period (default: 1 hour). The dashboard automatically refreshes tokens using a secure refresh token. API clients should handle401 Unauthorized responses by re-authenticating.