Complete the OAuth authentication flow by exchanging the authorization code received from the provider for a user session. On success, setsDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/eggarcia98/auth-backend/llms.txt
Use this file to discover all available pages before exploring further.
accessToken and refreshToken as HTTP-only cookies and returns the authenticated user and tokens in the response body.
This endpoint uses PKCE (Proof Key for Code Exchange). The backend calls
exchangeCodeForSession with the authorization code, which Supabase validates against the stored code verifier. Each code can only be used once.Request
POST /api/v1/auth/oauth/:provider/callback
No authentication required.
Path parameters
The OAuth provider the code was issued by. Accepted values:
google, apple.Body
The authorization code returned by the OAuth provider in the redirect URL query parameter
code. Extract this from the callback URL on your frontend before sending it here.Response
On success, the response sets two HTTP-only cookies:accessToken— short-lived JWT for authenticating API requests.refreshToken— long-lived token (7 days) for obtaining new access tokens.
Indicates whether the request succeeded. Always
true on success.Confirmation message. Value:
"OAuth authentication successful, tokens set in cookies".Examples
Success response
200
Error responses
400
401