OAuth provider redirect callback.
Called by the IdP (Azure AAD, Google) after the user consents at their authorize URL. Consumes the one-time `state`, exchanges the `code` for tokens (persisting the refresh token to the vault + cache), then upserts `user_provider_identity_linking` with the IdP subject claim. Response body depends on whether the state row had a `return_to`: - Set: 302 to that URL with `?status=success` (used by CLI static page). - Unset: 200 with HTML that `postMessage`s the popup opener and closes.
Path Parameters
Value in
- "azure"
- "gitHub"
- "google"
Query Parameters
Response Body
text/html
text/html
curl -X GET "https://example.com/v1/auth/providers/azure/callback""string""string"SSO callback (code exchange)
Exchanges the authorization code from the Identity Provider for tokens, validates the ID token, and performs JIT user provisioning if needed. Returns Supabase JWT tokens for the authenticated session.
List AI credentials
Returns all AI provider credentials registered by the authenticated user. The API key itself is never returned — only the provider name, optional base URL, and timestamps. Use this to check which providers are configured before calling Magic Dust analysis. **Required scope:** `ai:read`