Skip to main content

Documentation 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.

Generate the authorization URL for a supported OAuth provider. Redirect the user to this URL to begin the OAuth flow. The URL includes a PKCE challenge for enhanced security.
This endpoint uses the PKCE (Proof Key for Code Exchange) flow. After the user authenticates, the provider redirects back to your frontend with an authorization code. Pass that code to OAuth callback to complete authentication.

Request

GET /api/v1/auth/oauth/:provider No authentication required.

Path parameters

provider
string
required
The OAuth provider to use. Accepted values: google, apple.

Response

success
boolean
required
Indicates whether the request succeeded. Always true on success.
data
object

Examples

curl --request GET \
  --url https://your-api.com/api/v1/auth/oauth/google

Success response

200
{
  "success": true,
  "data": {
    "url": "https://accounts.google.com/o/oauth2/v2/auth?client_id=...&redirect_uri=...&response_type=code&scope=email+profile&code_challenge=...&code_challenge_method=S256"
  }
}

Error responses

400
{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Failed to generate google authorization URL"
  }
}

Build docs developers (and LLMs) love