Clous OAuth Integration
Clous OAuth endpoints live on the API origin, normally https://api.clous.app.
Discovery
GET /.well-known/openid-configurationGET /.well-known/oauth-protected-resourceGET /oauth/.well-known/openid-configuration
Flow
- Generate a PKCE verifier/challenge pair.
- Build
/oauth/authorize/URL withresponse_type=code,client_id,redirect_uri,scope,state,code_challenge, andcode_challenge_method=S256. - Exchange the code at
/oauth/token/. - Store access and refresh tokens in the host secret store.
- Call
/oauth/userinfo/only when identity display or tenant routing requires it.
Guardrails
- Reject redirect URIs not registered for the client.
- Never write OAuth tokens into repo files, logs, prompts, or examples.
- Keep user-delegated OAuth distinct from server API keys.