Authentication
Authorize
Initiate OAuth authorization flow.
Generates an authorization URL for the specified provider and stores the flow state in the database for CSRF protection.
Flow:
- Resolve provider configuration (account override -> system fallback)
- Generate state token (if not provided)
- Store state in oauth_states table
- Generate authorization URL via provider handler
- Return URL and state
POST
Authorize
Path Parameters
Body
application/json
Request body for starting an OAuth flow.
URI to redirect to after OAuth completion
Account identifier (slug or ID)
Display name for the new account (used when creating a new account)
Required string length:
1 - 255Optional state for CSRF (auto-generated if missing)
Previous
CallbackComplete OAuth authorization flow.
Validates the state token, exchanges the authorization code for tokens,
and creates or updates the user record. Returns JWT tokens.
Flow:
1. Validate state token and check expiration
2. Resolve provider configuration
3. Exchange code for tokens via provider handler
4. Fetch user info via provider handler
5. Link to existing user or create new user/account
6. Generate JWT tokens and return response
Next
Authorize