# Integrations

The Serverless API Gateway provides built-in integrations that handle authentication flows, request proxying, and service bindings with minimal configuration. Each integration is specified in the `paths[].integration.type` field of your `api-config.json`.

For general authentication setup, see the [Authentication Guide](/configuration/authentication.md). For JWT-based authorization, see [Authorizer](/configuration/authorizer.md).

## Authentication Integrations

### Auth0

OAuth 2.0 / OpenID Connect integration with [Auth0](https://auth0.com). Supports login redirect, callback handling, token exchange, and user profile retrieval.

* [Auth0 Integration Guide](/configuration/auth0.md) -- configuration, environment variables, and OAuth flow
* [Auth0 Quickstart](/reader-guides/quickstart-first-proxy/quickstart-auth0-route.md) -- step-by-step setup

### Supabase OTP

Passwordless authentication via Supabase. Supports email OTP, phone OTP (SMS), and magic links.

* [Supabase OTP Configuration Guide](/configuration/supabase-otp.md) -- setup, magic link vs OTP, email templates, and troubleshooting
* [Supabase Passwordless Quickstart](/reader-guides/quickstart-first-proxy/quickstart-supabase-passwordless.md) -- step-by-step setup

## Integration Type Reference

The `paths[].integration.type` field supports the following values:

### Proxy and Service Integrations

| Type              | Description                                                                     |
| ----------------- | ------------------------------------------------------------------------------- |
| `http`            | Forward the request to an external HTTP endpoint and return the response        |
| `http_proxy`      | Proxy the request to an external HTTP endpoint, preserving headers and path     |
| `service`         | Call an internal service endpoint                                               |
| `service_binding` | Invoke a [Cloudflare Worker service binding](/configuration/service-binding.md) |

### Auth0 Integrations

| Type                      | Description                                                                        |
| ------------------------- | ---------------------------------------------------------------------------------- |
| `auth0_callback`          | Handle the OAuth callback from Auth0, exchanging the authorization code for tokens |
| `auth0_callback_redirect` | Redirect the user to the Auth0 login page to initiate authentication               |
| `auth0_userinfo`          | Retrieve the authenticated user's profile from Auth0's `/userinfo` endpoint        |
| `auth0_refresh`           | Refresh an expired Auth0 access token using a refresh token                        |

### Supabase Integrations

| Type                             | Description                                                                     |
| -------------------------------- | ------------------------------------------------------------------------------- |
| `supabase_passwordless_auth`     | Send a one-time password (OTP) to an email address or phone number via Supabase |
| `supabase_passwordless_verify`   | Verify the OTP and return JWT access and refresh tokens                         |
| `supabase_passwordless_auth_alt` | Alternative passwordless auth endpoint for custom configurations                |

## Related Pages

* [Authentication Guide](/configuration/authentication.md) -- configure authentication across providers
* [Authorizer](/configuration/authorizer.md) -- JWT validation and authorization settings
* [CORS](/configuration/cors.md) -- cross-origin request configuration
* [Service Binding](/configuration/service-binding.md) -- Cloudflare Worker service binding setup
* [Paths Configuration](/configuration/paths.md) -- route and path setup


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.serverlessapigateway.com/configuration/integrations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
