fix(docs) Resolve local link paths caused that have redirects (#48453)

## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## Problem

The Docs E2E link checker found broken links throughout docs, starting
with `phone-login.mdx` pointing to `/docs/guides/cli/config` (404).

Old links like `/docs/guides/cli/config` still work on the live site
because `supabase.com` has redirects set up for them, but these links
break on the docs preview site, which is what the E2E check tests
against. These issues look clean on the live site, and I didn't catch
them in my first pass because I was testing production instead of the
preview.

The E2E check only tests the ~20 pages a given PR happens to touch, so
fixing the pages it flagged kept exposing more of the same problem one
page at a time as each fix pulled in a new file. To stop chasing this
incrementally, I cross-referenced every `/docs/guides/*` and
`/docs/reference/*` redirect source in `apps/www/lib/redirects.js`
against actual usage across all of `apps/docs`, and verified each
candidate against the live preview.

## Solution

Rather than updating the Docs E2E link checker, this PR resolves the
links. **Why:** we own these docs, so keeping the links clean without
redirects is keeping the house maintained. See [Broken Window
Theory](https://blog.codinghorror.com/the-broken-window-theory/).

Updated every link still using an old path to point straight at the
current page instead of relying on a redirect. This covers old links
like:

- `/docs/guides/cli/config` →
`/docs/guides/local-development/cli/config`
- `/docs/guides/cli/getting-started` →
`/docs/guides/local-development/cli/getting-started`
- `/docs/guides/cli/local-development` →
`/docs/guides/local-development/database-migrations`
- `/docs/guides/cli/managing-environments` →
`/docs/guides/deployment/managing-environments`
- `/docs/guides/cli/seeding-your-database` →
`/docs/guides/local-development/seeding-your-database`
- bare `/docs/guides/cli` → `/docs/guides/local-development`
- `/docs/guides/platform/compute-add-ons` →
`/docs/guides/platform/compute-and-disk`
- `/docs/guides/platform/shared-responsibility-model` →
`/docs/guides/deployment/shared-responsibility-model`
- `/docs/guides/database` → `/docs/guides/database/overview`
- `/docs/reference/javascript`, `/docs/reference/dart`,
`/docs/reference/kotlin`, `/docs/reference/python`,
`/docs/reference/csharp` → their `/introduction` pages (the redirect's
own destination, `/start`, turned out to be dead even on production — a
separate bug in `redirects.js` I didn't touch here)
- and about 35 more of the same pattern, listed in the commit messages

Also fixed a handful of dead heading anchors found along the way (links
that resolve to the right page but point at a `#section` that got
renamed or moved), including the original `#bigquery` anchor and a few
in `connecting-to-postgres.mdx` where content moved to its own dedicated
page.

Left alone on purpose:
- `content/guides/cli.mdx` — this page has no route in the docs app at
all (no `app/guides/cli/` directory), so it 404s even in production
before the `www` redirect ever fires. Fixing its internal link wouldn't
change that; it needs an actual routing/content decision, not a link
fix.
- A few candidates that already resolve fine as-is (`pg_partman`, bare
`/docs/reference/api`, bare `/docs/reference/cli`) — confirmed via curl,
left untouched.

## Manual testing

1. Confirmed every new link target actually exists by checking the
destination file/page and matching heading anchors.
2. Cross-referenced every `/docs/guides/*` and `/docs/reference/*`
redirect source in `apps/www/lib/redirects.js` against real usage in
`apps/docs`, and curl-verified each old path (404) and new path (200)
against the live PR preview before fixing it.
3. Ran the Docs E2E link checker locally against changed pages.
4. Spot-checked the original broken link from CI
(`/docs/guides/cli/config`) to confirm it now points to a working page.
This commit is contained in:
Miranda Limonczenko authored and GitHub committed 2026-07-29 14:47:17 -07:00
1 parent 8dc0f93c59
commit abbf667084
105 files changed
+187 -187

No files matched your search

@@ -27,7 +27,7 @@ Now set up the database schema. You can use the "User Management Starter" quicks
<Admonition type="note">
You can pull the database schema down to your local project by running the `db pull` command. Read the [local development docs](/docs/guides/cli/local-development#link-your-project) for detailed instructions.
You can pull the database schema down to your local project by running the `db pull` command. Read the [local development docs](/docs/guides/local-development/database-migrations#link-your-project) for detailed instructions.
```bash
supabase link --project-ref <project-id>
@@ -1,5 +1,5 @@
This tutorial demonstrates how to build a basic user management app. The app authenticates and identifies the user, stores their profile information in the database, and allows the user to log in, update their profile details, and upload a profile photo. The app uses:
- [Supabase Database](/docs/guides/database) - a Postgres database for storing your user data and [Row Level Security](/docs/guides/auth#row-level-security) so data is protected and users can only access their own information.
- [Supabase Database](/docs/guides/database/overview) - a Postgres database for storing your user data and [Row Level Security](/docs/guides/auth#row-level-security) so data is protected and users can only access their own information.
- [Supabase Auth](/docs/guides/auth) - allow users to sign up and log in.
- [Supabase Storage](/docs/guides/storage) - allow users to upload a profile photo.
@@ -22,7 +22,7 @@ Skills are installed at project scope by default, placing them in your repositor
Add skills for all detected agents at the same time by passing `--all`. See the [skills package](https://github.com/vercel-labs/skills) for more options.
You can also install the agent skills together with the Supabase MCP server using the [Supabase Plugin for AI Coding Agents](/docs/guides/getting-started/plugins) for a combined one-step setup.
You can also install the agent skills together with the Supabase MCP server using the [Supabase Plugin for AI Coding Agents](/docs/guides/ai-tools/plugins) for a combined one-step setup.
## Available skills
@@ -6,7 +6,7 @@ description: 'The Supabase plugin for AI coding agents bundles the MCP server an
sidebar_label: 'Supabase Plugin for AI Coding Agents'
---
The Supabase Plugin for AI Coding Agents gives your AI coding agent everything it needs to work with Supabase. It bundles the [Supabase MCP server](/docs/guides/getting-started/mcp) and [Supabase agent skills](/docs/guides/getting-started/ai-skills) so your agent can query your database, manage migrations, deploy Edge Functions, and follow Supabase and Postgres best practices — without manual configuration.
The Supabase Plugin for AI Coding Agents gives your AI coding agent everything it needs to work with Supabase. It bundles the [Supabase MCP server](/docs/guides/ai-tools/mcp) and [Supabase agent skills](/docs/guides/ai-tools/ai-skills) so your agent can query your database, manage migrations, deploy Edge Functions, and follow Supabase and Postgres best practices — without manual configuration.
## Quick installation
@@ -28,13 +28,13 @@ Plugins for AI coding agents are packages of AI agent extensions. A single plugi
- **Agents** — specialized sub-agents with specific personas and tool configurations
- **Slash commands** — custom commands you can invoke directly in chat
Bundling the [MCP server](/docs/guides/getting-started/mcp) and [agent skills](/docs/guides/getting-started/ai-skills) into a single plugin means you can set up both in one step. You can also install them separately if you prefer. You can install the plugin globally to use it across all your projects, or per project to keep it isolated.
Bundling the [MCP server](/docs/guides/ai-tools/mcp) and [agent skills](/docs/guides/ai-tools/ai-skills) into a single plugin means you can set up both in one step. You can also install them separately if you prefer. You can install the plugin globally to use it across all your projects, or per project to keep it isolated.
## What's included
### Supabase MCP server
The [Supabase MCP server](/docs/guides/getting-started/mcp) connects your AI coding agent directly to your Supabase projects. Once authenticated, your agent can query your database, manage migrations, deploy Edge Functions, and more — see the [full list of available tools](/docs/guides/getting-started/mcp#available-tools).
The [Supabase MCP server](/docs/guides/ai-tools/mcp) connects your AI coding agent directly to your Supabase projects. Once authenticated, your agent can query your database, manage migrations, deploy Edge Functions, and more — see the [full list of available tools](/docs/guides/ai-tools/mcp#available-tools).
### Supabase agent skills
@@ -43,7 +43,7 @@ Skills provide your agent with Supabase-specific procedural knowledge:
- **`supabase`** — Core guidance for working with Supabase products (Database, Auth, Edge Functions, Storage, Realtime)
- **`supabase-postgres-best-practices`** — Postgres query optimization, schema design, connection management, and RLS patterns
For a full list of available skills and supported agents, see [Agent Skills](/docs/guides/getting-started/ai-skills).
For a full list of available skills and supported agents, see [Agent Skills](/docs/guides/ai-tools/ai-skills).
## Manual installation
@@ -30,7 +30,7 @@ poetry new image-search
## Setup Supabase project
If you haven't already, [install the Supabase CLI](/docs/guides/cli), then initialize Supabase in the root of your newly created poetry project:
If you haven't already, [install the Supabase CLI](/docs/guides/local-development), then initialize Supabase in the root of your newly created poetry project:
```shell
supabase init
@@ -28,7 +28,7 @@ poetry new video-search
## Setup Supabase project
If you haven't already, [install the Supabase CLI](/docs/guides/cli), then initialize Supabase in the root of your newly created poetry project:
If you haven't already, [install the Supabase CLI](/docs/guides/local-development), then initialize Supabase in the root of your newly created poetry project:
```shell
supabase init
@@ -48,7 +48,7 @@ Prepare the database schema. We can use the "OpenAI Vector Search" quickstart in
<StepHikeCompact.Details title="Set up Supabase locally">
Make sure you have the latest version of the [Supabase CLI installed](/docs/guides/cli/getting-started).
Make sure you have the latest version of the [Supabase CLI installed](/docs/guides/local-development/cli/getting-started).
Initialize Supabase in the root directory of your app.
@@ -13,7 +13,7 @@ OpenAI's API is intended to be used from the server-side. Supabase offers Edge F
## Setup Supabase project
If you haven't already, [install the Supabase CLI](/docs/guides/cli) and initialize your project:
If you haven't already, [install the Supabase CLI](/docs/guides/local-development) and initialize your project:
```shell
supabase init
@@ -113,7 +113,7 @@ First, a few generic tips which you can pick and choose from:
## Useful links
Don't forget to check out the general [Production Checklist](/docs/guides/platform/going-into-prod) to ensure your project is secure, performant, and will remain available for your users.
Don't forget to check out the general [Production Checklist](/docs/guides/deployment/going-into-prod) to ensure your project is secure, performant, and will remain available for your users.
You can look at our [Choosing Compute Add-on](/docs/guides/ai/choosing-compute-addon) guide to get a basic understanding of how much compute you might need for your workload.
+1 -1
View File
@@ -69,7 +69,7 @@ Edge Functions are server-side TypeScript functions that run on-demand. Since Ed
<Admonition type="note">
You will need the `supabase` CLI [installed](/docs/guides/cli) for the following commands to work.
You will need the `supabase` CLI [installed](/docs/guides/local-development) for the following commands to work.
</Admonition>
@@ -17,7 +17,7 @@ Build an Edge Function that accepts an input string and generates an embedding f
<StepHikeCompact.Details title="Set up Supabase locally">
Make sure you have the latest version of the [Supabase CLI installed](/docs/guides/cli/getting-started).
Make sure you have the latest version of the [Supabase CLI installed](/docs/guides/local-development/cli/getting-started).
Initialize Supabase in the root directory of your app and start your local stack.
@@ -9,7 +9,7 @@ Supabase provides a Python client called [`vecs`](https://github.com/supabase/ve
## Quick start
To see how Vecs works, use a local database. Make sure you have the Supabase CLI [installed](/docs/guides/cli#installation) on your machine.
To see how Vecs works, use a local database. Make sure you have the Supabase CLI [installed](/docs/guides/local-development/cli/getting-started#installing-the-supabase-cli) on your machine.
### Initialize your project
@@ -38,7 +38,7 @@ The Supabase team has received reports of user metadata being cached across uniq
<Admonition type="note" title="Self hosting and local development">
For self-hosting, you can update your project configuration using the files and environment variables provided. See the [local development docs](/docs/guides/cli/config) for more details.
For self-hosting, you can update your project configuration using the files and environment variables provided. See the [local development docs](/docs/guides/local-development/cli/config) for more details.
</Admonition>
@@ -362,7 +362,7 @@ async function resolveDataConflicts(anonymousUserId, existingUserId) {
## Abuse prevention and rate limits
Since anonymous users are stored in your database, bad actors can abuse the endpoint to increase your database size drastically. It is strongly recommended to [enable invisible CAPTCHA or Cloudflare Turnstile](/docs/guides/auth/auth-captcha) to prevent abuse for anonymous sign-ins. An IP-based rate limit is enforced at 30 requests per hour which can be modified in your [dashboard](/dashboard/project/_/auth/rate-limits). You can refer to the full list of rate limits [here](/docs/guides/platform/going-into-prod#rate-limiting-resource-allocation--abuse-prevention).
Since anonymous users are stored in your database, bad actors can abuse the endpoint to increase your database size drastically. It is strongly recommended to [enable invisible CAPTCHA or Cloudflare Turnstile](/docs/guides/auth/auth-captcha) to prevent abuse for anonymous sign-ins. An IP-based rate limit is enforced at 30 requests per hour which can be modified in your [dashboard](/dashboard/project/_/auth/rate-limits). You can refer to the full list of rate limits [here](/docs/guides/deployment/going-into-prod#rate-limiting-resource-allocation--abuse-prevention).
## Automatic cleanup
@@ -169,7 +169,7 @@ If you are using an external email provider that enables "email tracking", the l
### Redirecting the user to a server-side endpoint
If you intend to use [Server-side rendering](/docs/guides/auth/server-side-rendering), you might want the email link to redirect the user to a server-side endpoint to check if they are authenticated before returning the page. However, the default email link will redirect the user after verification to the redirect URL with the session in the query fragments. Since the session is returned in the query fragments by default, you won't be able to access it on the server-side.
If you intend to use [Server-side rendering](/docs/guides/auth/server-side/advanced-guide), you might want the email link to redirect the user to a server-side endpoint to check if they are authenticated before returning the page. However, the default email link will redirect the user after verification to the redirect URL with the session in the query fragments. Since the session is returned in the query fragments by default, you won't be able to access it on the server-side.
You can customize the email link in the email template to redirect the user to a server-side endpoint successfully. For example:
@@ -326,7 +326,7 @@ revoke all
</TabPanel>
<TabPanel id="restrict-access-to-sso-users" label="Restrict access to SSO users">
You can restrict access to internal applications with a hook. For example, you can require that employees log in via [SAML Single Sign On (SSO)](/docs/guides/auth/sso/auth-sso-saml). You can exempt select employees from the policy via an allowlist.
You can restrict access to internal applications with a hook. For example, you can require that employees log in via [SAML Single Sign On (SSO)](/docs/guides/auth/enterprise-sso/auth-sso-saml). You can exempt select employees from the policy via an allowlist.
```sql
create or replace function public.restrict_application_access(event jsonb)
@@ -426,7 +426,7 @@ Deno.serve(async (req) => {
</TabPanel>
<TabPanel id="http-restrict-access-to-sso-users" label="Restrict access to SSO users">
You can restrict access to internal applications with a hook. For example, you can require that employees log in via [SAML Single Sign On (SSO)](/docs/guides/auth/sso/auth-sso-saml). You can exempt select employees from the policy via an allowlist.
You can restrict access to internal applications with a hook. For example, you can require that employees log in via [SAML Single Sign On (SSO)](/docs/guides/auth/enterprise-sso/auth-sso-saml). You can exempt select employees from the policy via an allowlist.
```javascript
import { Webhook } from 'https://esm.sh/standardwebhooks@1.0.0'
@@ -14,7 +14,7 @@ Currently, Supabase Auth supports 2 strategies to link an identity to a user:
<Admonition type="note" title="No identity linking for SSO accounts">
Users that signed up with [SAML SSO](/docs/guides/auth/sso/auth-sso-saml) will not be considered as targets for identity linking (automatic or manual) for security reasons.
Users that signed up with [SAML SSO](/docs/guides/auth/enterprise-sso/auth-sso-saml) will not be considered as targets for identity linking (automatic or manual) for security reasons.
</Admonition>
@@ -92,4 +92,4 @@ In a cookie-based framework you can compose the two — let `@supabase/ssr` own
- [Server-side rendering](/guides/auth/server-side) — set up `@supabase/ssr` for your framework.
- [`@supabase/server` reference](/docs/reference/server) — API for header-based server auth.
- [`supabase-js` reference](/docs/reference/javascript) — the base JavaScript client.
- [`supabase-js` reference](/docs/reference/javascript/introduction) — the base JavaScript client.
@@ -3,4 +3,4 @@ title: 'Enterprise Single Sign-On'
description: 'Learn about Single Sign-On support in Supabase Auth for enterprise applications'
---
Supabase Auth supports building enterprise applications that require Single Sign-On (SSO) authentication [with SAML 2.0](/docs/guides/auth/sso/auth-sso-saml).
Supabase Auth supports building enterprise applications that require Single Sign-On (SSO) authentication [with SAML 2.0](/docs/guides/auth/enterprise-sso/auth-sso-saml).
@@ -438,6 +438,6 @@ USING (
## Next steps
- [Learn about JWTs](/docs/guides/auth/jwts) - Deep dive into Supabase token structure
- [Row Level Security](/docs/guides/auth/row-level-security) - Complete RLS guide
- [Row Level Security](/docs/guides/database/postgres/row-level-security) - Complete RLS guide
- [Custom Access Token Hooks](/docs/guides/auth/auth-hooks/custom-access-token-hook) - Inject custom claims
- [OAuth flows](/docs/guides/auth/oauth-server/oauth-flows) - Understand token issuance
@@ -25,7 +25,7 @@ Phone OTP login can:
Enable phone authentication on the [Auth Providers page](/dashboard/project/_/auth/providers) for hosted Supabase projects.
For self-hosted projects or local development, use the [configuration file](/docs/guides/cli/config#auth.sms.enable_signup). See the configuration variables namespaced under `auth.sms`.
For self-hosted projects or local development, use the [configuration file](/docs/guides/local-development/cli/config#auth.sms.enable_signup). See the configuration variables namespaced under `auth.sms`.
You also need to set up an SMS provider. Each provider has its own configuration. Supported providers include MessageBird, Twilio, Vonage, and TextLocal (community-supported).
@@ -5,7 +5,7 @@ description: 'Learn how to implement social authentication in an app with Expo R
This tutorial demonstrates how to build a React Native app with [Expo](https://expo.dev) that implements social authentication. The app showcases a complete authentication flow with protected navigation using:
- [Supabase Database](/docs/guides/database) - a Postgres database for storing your user data with [Row Level Security](/docs/guides/auth#row-level-security) to ensure data is protected and users can only access their own information.
- [Supabase Database](/docs/guides/database/overview) - a Postgres database for storing your user data with [Row Level Security](/docs/guides/auth#row-level-security) to ensure data is protected and users can only access their own information.
- [Supabase Auth](/docs/guides/auth) - enables users to log in through social authentication providers (Apple and Google).
![Supabase Social Auth example](/docs/img/supabase-expo-social-auth-login.png)
+1 -1
View File
@@ -12,7 +12,7 @@ Supabase has first-class support for these third-party authentication providers:
- [AWS Cognito (with or without AWS Amplify)](/docs/guides/auth/third-party/aws-cognito)
- [WorkOS](/docs/guides/auth/third-party/workos)
You can use these providers alongside Supabase Auth, or on their own, to access the [Data API (REST and GraphQL)](/docs/guides/database), [Storage](/docs/guides/storage), [Realtime](/docs/guides/storage) and [Functions](/docs/guides/functions) from your existing apps.
You can use these providers alongside Supabase Auth, or on their own, to access the [Data API (REST and GraphQL)](/docs/guides/database/overview), [Storage](/docs/guides/storage), [Realtime](/docs/guides/storage) and [Functions](/docs/guides/functions) from your existing apps.
If you already have production apps using one of these authentication providers, and would like to use a Supabase feature, you no longer need to migrate your users to Supabase Auth or use workarounds like translating JWTs into the Supabase Auth format and using your project's signing secret.
@@ -69,12 +69,12 @@ The Data APIs allow you to interact with your database using REST or GraphQL req
For convenience, you can also use the [Supabase client libraries](/docs/reference), which wrap the Data APIs with a developer-friendly interface and automatically handle authentication:
- [JavaScript](/docs/reference/javascript)
- [Flutter](/docs/reference/dart)
- [JavaScript](/docs/reference/javascript/introduction)
- [Flutter](/docs/reference/dart/introduction)
- [Swift](/docs/reference/swift)
- [Python](/docs/reference/python)
- [C#](/docs/reference/csharp)
- [Kotlin](/docs/reference/kotlin)
- [Python](/docs/reference/python/introduction)
- [C#](/docs/reference/csharp/introduction)
- [Kotlin](/docs/reference/kotlin/introduction)
## Direct connection
@@ -7,7 +7,7 @@ subtitle: 'Connecting to your Postgres database in serverless environments.'
Supabase provides several options for connecting to your Postgres database from serverless environments.
[supabase-js](/docs/reference/javascript/introduction) is an isomorphic JavaScript client that uses the [auto-generated REST API](/docs/guides/api) and therefore works in any environment that supports HTTPS connections. This API has a built-in [connection pooler](/docs/guides/database/connecting-to-postgres#connection-pooler) and can serve thousands of simultaneous requests, and therefore is ideal for Serverless workloads.
[supabase-js](/docs/reference/javascript/introduction) is an isomorphic JavaScript client that uses the [auto-generated REST API](/docs/guides/api) and therefore works in any environment that supports HTTPS connections. This API has a built-in [connection pooler](/docs/guides/database/connecting-to-postgres#poolers) and can serve thousands of simultaneous requests, and therefore is ideal for Serverless workloads.
## Vercel Edge Functions
@@ -7,7 +7,7 @@ subtitle: 'Using your connections resourcefully'
## Connections
Every [Compute Add-On](/docs/guides/platform/compute-add-ons) has a pre-configured direct connection count and Supavisor pool size. This guide discusses ways to observe and manage them resourcefully.
Every [Compute Add-On](/docs/guides/platform/compute-and-disk) has a pre-configured direct connection count and Supavisor pool size. This guide discusses ways to observe and manage them resourcefully.
### Configuring Supavisor's pool size
@@ -165,8 +165,8 @@ Use the examples below with `supabase postgres-config update --project-ref <proj
To start:
1. [Install](/docs/guides/resources/supabase-cli) Supabase CLI 1.69.0+.
2. [Log in](/docs/guides/cli/local-development#log-in-to-the-supabase-cli) to your Supabase account using the CLI.
1. [Install](/docs/guides/local-development) Supabase CLI 1.69.0+.
2. [Log in](/docs/guides/local-development/database-migrations#log-in-to-the-supabase-cli) to your Supabase account using the CLI.
To update Postgres configurations, use the [`postgres config`](/docs/reference/cli/supabase-postgres-config) command:
@@ -256,4 +256,4 @@ alter role "<role_name>" set "<setting_name>" to default;
1. Changes through the CLI might restart the database causing momentary disruption to existing database connections; in most cases this should not take more than a few seconds. However, you can use the --no-restart flag to bypass the restart and keep the connections intact. Keep in mind that this depends on the specific configuration changes you're making. if the change requires a restart, using the --no-restart flag will prevent the restart but you won't see those changes take effect until a restart is manually triggered. Additionally, some parameters are required to be the same on Primary and Read Replicas; not restarting in these cases can result in read replica failure if the Primary/Read Replicas restart in isolation.
2. Custom Postgres Config will always override the default optimizations generated by Supabase. When changing compute add-ons, you should also review and update your custom Postgres Config to ensure they remain compatible and effective with the updated compute.
3. Some parameters (e.g. `wal_keep_size`) can increase disk utilization, triggering disk expansion, which in turn can lead to [increases in your bill](/docs/guides/platform/compute-add-ons#disk-io).
3. Some parameters (e.g. `wal_keep_size`) can increase disk utilization, triggering disk expansion, which in turn can lead to [increases in your bill](/docs/guides/platform/compute-and-disk#disk).
@@ -363,7 +363,7 @@ select
) as request_id;
```
### Call an endpoint every minute with [pg_cron](/docs/guides/database/extensions/pgcron)
### Call an endpoint every minute with [pg_cron](/docs/guides/database/extensions/pg_cron)
The pg_cron extension enables Postgres to become its own cron server. With it you can schedule regular calls with up to a minute precision to endpoints.
@@ -47,7 +47,7 @@ PGAudit can be configured with different levels of precision.
**PGAudit logging precision:**
- **[Session](#session-logging):** Logs activity within a connection, such as a [psql](/docs/guides/database/connecting-to-postgres#connecting-with-psql) connection.
- **[Session](#session-logging):** Logs activity within a connection, such as a [psql](/docs/guides/database/psql) connection.
- **[User](#user-logging):** Logs activity by a particular database user (for example, `anon` or `postgres`).
- **[Global](#global-logging):** Logs activity across the entire database.
- **[Object](#object-logging):** Logs events related to specific database objects (for example, the auth.users table).
@@ -83,7 +83,7 @@ Below is a limited example of how to assign PGAudit to monitor specific categori
### Session logging
When you are connecting in a session environment, such as a [psql](/docs/guides/database/connecting-to-postgres#connecting-with-psql) connection, you can configure PGAudit to record events initiated within the session.
When you are connecting in a session environment, such as a [psql](/docs/guides/database/psql) connection, you can configure PGAudit to record events initiated within the session.
<Admonition type="note">
@@ -77,7 +77,7 @@ The Supabase API allows you to programmatically import data into your tables. Yo
When importing data via the Supabase API, it's advisable to refrain from bulk imports. This helps ensure a smooth data transfer process and prevents any potential disruptions.
Read more about [Rate Limiting, Resource Allocation, & Abuse Prevention.](/docs/guides/platform/going-into-prod#rate-limiting-resource-allocation--abuse-prevention)
Read more about [Rate Limiting, Resource Allocation, & Abuse Prevention.](/docs/guides/deployment/going-into-prod#rate-limiting-resource-allocation--abuse-prevention)
</Admonition>
@@ -55,7 +55,7 @@ Prisma couldn't establish a connection with Postgres or Supavisor before the tim
#### Solutions: [#solution-cant-reach-database-server-at]
- **Check database health**: Use the [Observability Dashboard](/dashboard/project/_/observability/database) to monitor CPU, memory, and I/O usage. If the database is overloaded, consider increasing your [compute size](/docs/guides/platform/compute-add-ons) or [optimizing your queries](/docs/guides/database/query-optimization).
- **Check database health**: Use the [Observability Dashboard](/dashboard/project/_/observability/database) to monitor CPU, memory, and I/O usage. If the database is overloaded, consider increasing your [compute size](/docs/guides/platform/compute-and-disk) or [optimizing your queries](/docs/guides/database/query-optimization).
- **Verify connection string**: Double-check the connection string in your Prisma configuration to ensure it matches in your [project connect page](/dashboard/project/_?showConnect=true).
- **Increase connection timeout**: Try increasing the `connect_timeout` parameter in your Prisma configuration to give it more time to establish a connection.
@@ -99,7 +99,7 @@ You can follow those steps with the following modifications:
1. Use the `postgres` user for replication (or create a new user with replication permissions: `ALTER USER <user> WITH REPLICATION;`)
2. Set `pluginname` to `test-decoding`
3. Depending on your databases the pre-assessment may fail. It is not required.
4. Increase `wal_sender_timeout` and other settings (`max_wal_size`) using the [Supabase CLI](/docs/guides/platform/custom-postgres-config)
4. Increase `wal_sender_timeout` and other settings (`max_wal_size`) using the [Supabase CLI](/docs/guides/database/custom-postgres-config)
</TabPanel>
@@ -15,7 +15,7 @@ Use Supabase client libraries, REST, or GraphQL with a publishable key. Protect
### Edge Functions
Put custom server-side logic between your client and database with [Edge Functions](/docs/guides/functions). You can use secrets, API keys, or database connection strings inside the function, and you can [disable the Data API](/docs/guides/database/data-api#disable-the-data-api-completely) if your app only accesses data this way.
Put custom server-side logic between your client and database with [Edge Functions](/docs/guides/functions). You can use secrets, API keys, or database connection strings inside the function, and you can [disable the Data API](/docs/guides/api/securing-your-api#disable-the-data-api) if your app only accesses data this way.
### Direct database connections
@@ -7,7 +7,7 @@ Supavisor logs are available under [Pooler Logs](/dashboard/project/_/logs/poole
| Error Type | Description | Resolution Link |
| ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| Max client connections reached | This error happens when the number of connections to Supavisor is more than [the allowed limit of your compute add-on](/docs/guides/platform/compute-add-ons). | Follow this [guide](https://github.com/orgs/supabase/discussions/22305) to resolve. |
| Max client connections reached | This error happens when the number of connections to Supavisor is more than [the allowed limit of your compute add-on](/docs/guides/platform/compute-and-disk). | Follow this [guide](https://github.com/orgs/supabase/discussions/22305) to resolve. |
| Connection failed `{:error, :eaddrnotavail}` to 'db.xxx.supabase.co':5432 | Supavisor cannot connect to the customer database. This is usually caused if the target database is unable to respond. | N/A |
| Connection failed `{:error, :nxdomain}` to 'db.xxx.supabase.co':5432 | Supavisor cannot connect to the customer database. This is usually caused if the target database is unable to respond. | N/A |
| Connection closed when state was authentication | This error happens when either the database doesn’t exist or if the user doesn't have the right credentials. | N/A |
@@ -14,7 +14,7 @@ To ensure that queries return the expected data, RLS policies are correctly appl
You can use the Supabase CLI to test your database. The minimum required version of the CLI is [v1.11.4](https://github.com/supabase/cli/releases). To get started:
- [Install the Supabase CLI](/docs/guides/cli) on your local machine
- [Install the Supabase CLI](/docs/guides/local-development) on your local machine
### Creating a test
@@ -12,7 +12,7 @@ You can hook into three table events: `INSERT`, `UPDATE`, and `DELETE`. All even
## Webhooks vs triggers
Database Webhooks are very similar to triggers, and that's because Database Webhooks are a convenience wrapper around triggers using the [pg_net](/docs/guides/database/extensions/pgnet) extension. This extension is asynchronous, and therefore will not block your database changes for long-running network requests.
Database Webhooks are very similar to triggers, and that's because Database Webhooks are a convenience wrapper around triggers using the [pg_net](/docs/guides/database/extensions/pg_net) extension. This extension is asynchronous, and therefore will not block your database changes for long-running network requests.
This video demonstrates how you can create a new customer in Stripe each time a row is inserted into a `profiles` table:
@@ -96,4 +96,4 @@ If you're experiencing connection issues with webhooks locally, verify you're us
## Resources
- [pg_net](/docs/guides/database/extensions/pgnet): an async networking extension for Postgres
- [pg_net](/docs/guides/database/extensions/pg_net): an async networking extension for Postgres
@@ -25,7 +25,7 @@ If `supabase/` is nested deeper in your repository, enter its parent directory i
## Preparing your Git repository
You will be using the [Supabase CLI](/docs/guides/cli) to initialize your local `./supabase` directory:
You will be using the [Supabase CLI](/docs/guides/local-development) to initialize your local `./supabase` directory:
<StepHikeCompact>
<StepHikeCompact.Step step={1}>
@@ -86,7 +86,7 @@ Check and review issues in your database using [Performance Advisor](/dashboard/
Running databases is a shared responsibility between you and Supabase. There are some things that we can take care of for you, and some things that you are responsible for.
Read more details in our [Shared Responsibility Model guide](/docs/guides/platform/shared-responsibility-model).
Read more details in our [Shared Responsibility Model guide](/docs/guides/deployment/shared-responsibility-model).
</Admonition>
@@ -22,21 +22,21 @@ Resources:
## In production
Once your application is live, you should never change your database using the Dashboard - everything should be done with [Migrations](/docs/guides/cli/managing-environments#create-a-new-migration). Some other important things to consider at this point include:
Once your application is live, you should never change your database using the Dashboard - everything should be done with [Migrations](/docs/guides/deployment/managing-environments#create-a-new-migration). Some other important things to consider at this point include:
- The Dashboard has various [access levels](/docs/guides/platform/access-control) that can prevent changes being made via the UI.
- Design a [safe workflow](/docs/guides/platform/shared-responsibility-model#you-decide-your-own-workflow) for managing your database. We strongly recommend running [multiple environments](/docs/guides/cli/managing-environments) as part of your development workflow (`local` -> `staging` -> `prod`).
- Do not share any production passwords with your team, _especially_ your `postgres` password. All changes should be made via version-controlled migrations which run via a bastion host or a CI platform (like [GitHub Actions](/docs/guides/cli/managing-environments#configure-github-actions). If you use GitHub Actions, use [approval workflows](https://docs.github.com/en/actions/managing-workflow-runs/reviewing-deployments) to prevent any migrations being run accidentally.
- Design a [safe workflow](/docs/guides/deployment/shared-responsibility-model#you-decide-your-own-workflow) for managing your database. We strongly recommend running [multiple environments](/docs/guides/deployment/managing-environments) as part of your development workflow (`local` -> `staging` -> `prod`).
- Do not share any production passwords with your team, _especially_ your `postgres` password. All changes should be made via version-controlled migrations which run via a bastion host or a CI platform (like [GitHub Actions](/docs/guides/deployment/managing-environments#configure-github-actions). If you use GitHub Actions, use [approval workflows](https://docs.github.com/en/actions/managing-workflow-runs/reviewing-deployments) to prevent any migrations being run accidentally.
- Restrict production access to your database using [Network Restrictions](/docs/guides/platform/network-restrictions).
- As your database to grows, we strongly recommend moving to [Point-in-Time Recovery](/docs/guides/platform/backups#point-in-time-recovery). This is safer and has less impact on your database performance during maintenance windows.
- Read the [Production Checklist](/docs/guides/platform/going-into-prod) and familiarize your team with the [Shared Responsibilities](/docs/guides/platform/shared-responsibility-model) between your organization and Supabase.
- Read the [Production Checklist](/docs/guides/deployment/going-into-prod) and familiarize your team with the [Shared Responsibilities](/docs/guides/deployment/shared-responsibility-model) between your organization and Supabase.
Resources:
- [Database migrations](/docs/guides/deployment/database-migrations)
- [Managing access on the Dashboard](/docs/guides/platform/access-control)
- [PGAudit for Postgres](/docs/guides/database/extensions/pgaudit)
- [Managing environments](/docs/guides/cli/managing-environments)
- [Managing environments](/docs/guides/deployment/managing-environments)
## Enterprise
@@ -42,7 +42,7 @@ We will also provide you with security alerts through [Security Advisor](/dashbo
There are _many_ ways to work with Supabase.
You can use our Dashboard, our client libraries, external tools like Prisma and Drizzle, or migration tools like our CLI, Flyway, Sqitch, and anything else that is Postgres-compatible. You can develop directly on your database while you're getting started, run migrations from [local to production](/docs/guides/getting-started/local-development), or you can use [multiple environments](/docs/guides/cli/managing-environments).
You can use our Dashboard, our client libraries, external tools like Prisma and Drizzle, or migration tools like our CLI, Flyway, Sqitch, and anything else that is Postgres-compatible. You can develop directly on your database while you're getting started, run migrations from [local to production](/docs/guides/local-development/database-migrations), or you can use [multiple environments](/docs/guides/deployment/managing-environments).
None of these are right or wrong. It depends on the stage of your project. You _definitely_ shouldn’t be developing on your database directly when you’re in production - but that’s absolutely fine when you’re prototyping and don’t have users.
@@ -81,7 +81,7 @@ You are responsible of provisioning enough compute to run the workload that your
## Before going to production
We recommend reviewing and applying the recommendations offered in our [Production Checklist](/docs/guides/platform/going-into-prod). This checklist covers the responsibilities discussed here and a few additional general production readiness best practices.
We recommend reviewing and applying the recommendations offered in our [Production Checklist](/docs/guides/deployment/going-into-prod). This checklist covers the responsibilities discussed here and a few additional general production readiness best practices.
## SOC 2 and compliance
@@ -95,7 +95,7 @@ You can use Supabase to store and process Protected Health Information (PHI). Yo
- [Marking specific projects as HIPAA projects](/docs/guides/platform/hipaa-projects) and addressing security issues raised by the advisor.
- Ensuring [MFA is enabled](/docs/guides/platform/multi-factor-authentication) on all Supabase accounts.
- [Enforce MFA](/docs/guides/platform/mfa/org-mfa-enforcement) as a requirement to access the organization
- Enabling [Point in Time Recovery](/docs/guides/platform/backups#point-in-time-recovery) which requires at least a [small compute add-on](/docs/guides/platform/compute-add-ons).
- Enabling [Point in Time Recovery](/docs/guides/platform/backups#point-in-time-recovery) which requires at least a [small compute add-on](/docs/guides/platform/compute-and-disk).
- Turning on [SSL Enforcement](/docs/guides/platform/ssl-enforcement).
- Enabling [Network Restrictions](/docs/guides/platform/network-restrictions).
- Keeping [Postgres connection logging](/docs/guides/platform/postgres-connection-logging) enabled. Supabase sets `log_connections` to off by default for new projects. Projects that need HIPAA compliance should keep connection logging on for audit trails, and the Security Advisor warns if it is disabled.
@@ -224,7 +224,7 @@ pipelines:
### Function configuration
Individual function configuration like [JWT verification](/docs/guides/cli/config#functions.function_name.verify_jwt) and [import map location](/docs/guides/cli/config#functions.function_name.import_map) can be set via the `config.toml` file.
Individual function configuration like [JWT verification](/docs/guides/local-development/cli/config#functions.function_name.verify_jwt) and [import map location](/docs/guides/local-development/cli/config#functions.function_name.import_map) can be set via the `config.toml` file.
```toml
[functions.hello-world]
@@ -8,7 +8,7 @@ tocVideo: 'lFhU3L8VoSQ'
<Admonition type="note">
Before getting started, make sure you have the Supabase CLI installed. Check out the [CLI installation guide](/docs/guides/cli) for installation methods and troubleshooting.
Before getting started, make sure you have the Supabase CLI installed. Check out the [CLI installation guide](/docs/guides/local-development) for installation methods and troubleshooting.
</Admonition>
@@ -47,7 +47,7 @@ We recommend this folder structure:
### Using config.toml
Individual function configuration like [JWT verification](/docs/guides/cli/config#functions.function_name.verify_jwt) and [import map location](/docs/guides/cli/config#functions.function_name.import_map) can be set via the `config.toml` file.
Individual function configuration like [JWT verification](/docs/guides/local-development/cli/config#functions.function_name.verify_jwt) and [import map location](/docs/guides/local-development/cli/config#functions.function_name.import_map) can be set via the `config.toml` file.
```toml supabase/config.toml
[functions.hello-world]
@@ -19,7 +19,7 @@ To get the most out of this guide, you’ll need to:
- [Create a Resend API key](https://resend.com/api-keys)
- [Verify your domain](https://resend.com/domains)
Make sure you have the latest version of the [Supabase CLI](/docs/guides/cli#installation) installed.
Make sure you have the latest version of the [Supabase CLI](/docs/guides/local-development/cli/getting-started#installing-the-supabase-cli) installed.
### 1. Create Supabase function
@@ -87,7 +87,7 @@ ELEVENLABS_API_KEY=your_api_key
The project uses a couple of dependencies:
- The [@supabase/supabase-js](/docs/reference/javascript) library to interact with the Supabase database.
- The [@supabase/supabase-js](/docs/reference/javascript/introduction) library to interact with the Supabase database.
- The ElevenLabs [JavaScript SDK](https://github.com/elevenlabs/elevenlabs-js) to interact with the text-to-speech API.
- The open-source [object-hash](https://www.npmjs.com/package/object-hash) to generate a hash from the request parameters.
@@ -97,7 +97,7 @@ FUNCTION_SECRET=random_secret
The project uses a couple of dependencies:
- The open-source [grammY Framework](https://grammy.dev/) to handle the Telegram webhook requests.
- The [@supabase/supabase-js](/docs/reference/javascript) library to interact with the Supabase database.
- The [@supabase/supabase-js](/docs/reference/javascript/introduction) library to interact with the Supabase database.
- The ElevenLabs [JavaScript SDK](https://github.com/elevenlabs/elevenlabs-js) to interact with the speech-to-text API.
Since Supabase Edge Function uses the [Deno runtime](https://deno.land/), you don't need to install the dependencies, rather you can [import](https://docs.deno.com/examples/npm/) them via the `npm:` prefix.
@@ -45,7 +45,7 @@ jobs:
Since Supabase CLI [v1.62.0](https://github.com/supabase/cli/releases/tag/v1.62.0) you can deploy all functions with a single command.
Individual function configuration like [JWT verification](/docs/guides/cli/config#functions.function_name.verify_jwt) and [import map location](/docs/guides/cli/config#functions.function_name.import_map) can be set via the `config.toml` file.
Individual function configuration like [JWT verification](/docs/guides/local-development/cli/config#functions.function_name.verify_jwt) and [import map location](/docs/guides/local-development/cli/config#functions.function_name.import_map) can be set via the `config.toml` file.
```toml
[functions.hello-world]
@@ -16,7 +16,7 @@ Edge Functions currently doesn't support image processing libraries such as `Sha
### Prerequisites
Make sure you have the latest version of the [Supabase CLI](/docs/guides/cli#installation) installed.
Make sure you have the latest version of the [Supabase CLI](/docs/guides/local-development/cli/getting-started#installing-the-supabase-cli) installed.
### Create the Edge Function
@@ -29,7 +29,7 @@ You need:
- [Docker](https://docs.docker.com/get-docker/) (to run Supabase locally)
- [Deno](https://deno.land/) (Supabase Edge Functions runtime)
- [Supabase CLI](/docs/guides/cli/getting-started)
- [Supabase CLI](/docs/guides/local-development/cli/getting-started)
## Create a new MCP server
@@ -13,7 +13,7 @@ To get the most out of this guide, you’ll need to:
- [Create an API key](https://resend.com/api-keys)
- [Verify your domain](https://resend.com/domains)
Make sure you have the latest version of the [Supabase CLI](/docs/guides/cli#installation) installed.
Make sure you have the latest version of the [Supabase CLI](/docs/guides/local-development/cli/getting-started#installing-the-supabase-cli) installed.
### 1. Create Supabase function
@@ -8,7 +8,7 @@ Add the [Sentry Deno SDK](https://docs.sentry.io/platforms/javascript/guides/den
### Prerequisites
- [Create a Sentry account](https://sentry.io/signup/).
- Make sure you have the latest version of the [Supabase CLI](/docs/guides/cli#installation) installed.
- Make sure you have the latest version of the [Supabase CLI](/docs/guides/local-development/cli/getting-started#installing-the-supabase-cli) installed.
### 1. Create Supabase function
@@ -28,7 +28,7 @@ cp supabase/functions/upstash-redis-counter/.env.example supabase/functions/upst
## Code
Make sure you have the latest version of the [Supabase CLI installed](/docs/guides/cli#installation).
Make sure you have the latest version of the [Supabase CLI installed](/docs/guides/local-development/cli/getting-started#installing-the-supabase-cli).
Create a new function in your project:
@@ -249,7 +249,7 @@ Now that your function is deployed, you can access it from your local developmen
<Admonition type="note" title="CLI not installed?">
Before getting started, make sure you have the **Supabase CLI installed**. Check out the [CLI installation guide](/docs/guides/cli) for installation methods and troubleshooting.
Before getting started, make sure you have the **Supabase CLI installed**. Check out the [CLI installation guide](/docs/guides/local-development) for installation methods and troubleshooting.
</Admonition>
@@ -17,7 +17,7 @@ Supabase Edge Functions **only** supports creating functions in TypeScript with
## Prerequisites
- Make sure you have the Supabase CLI installed and configured. Read [the CLI installation guide](/docs/guides/cli) for installation methods and troubleshooting.
- Make sure you have the Supabase CLI installed and configured. Read [the CLI installation guide](/docs/guides/local-development) for installation methods and troubleshooting.
- Running and testing Supabase Edge Functions locally requires [Docker](https://www.docker.com/) or a Docker-compatible runtime.
## Step 1: Create or configure your project
@@ -13,9 +13,9 @@ description: 'Schedule Edge Functions with pg_cron.'
></iframe>
</div>
The hosted Supabase Platform supports the [`pg_cron` extension](/docs/guides/database/extensions/pgcron), a recurring job scheduler in Postgres.
The hosted Supabase Platform supports the [`pg_cron` extension](/docs/guides/database/extensions/pg_cron), a recurring job scheduler in Postgres.
In combination with the [`pg_net` extension](/docs/guides/database/extensions/pgnet), this allows us to invoke Edge Functions periodically on a set schedule.
In combination with the [`pg_net` extension](/docs/guides/database/extensions/pg_net), this allows us to invoke Edge Functions periodically on a set schedule.
<Admonition type="caution">
@@ -57,5 +57,5 @@ select
## Resources
- [`pg_net` extension](/docs/guides/database/extensions/pgnet)
- [`pg_cron` extension](/docs/guides/database/extensions/pgcron)
- [`pg_net` extension](/docs/guides/database/extensions/pg_net)
- [`pg_cron` extension](/docs/guides/database/extensions/pg_cron)
@@ -52,7 +52,7 @@ An open source Dashboard for managing your database and services.
A JWT-based API for managing users and issuing access tokens. This integrates with Postgres's Row Level Security and the API servers.
- Official Docs: [Supabase Auth reference docs](/docs/reference/auth)
- Official Docs: [Supabase Auth reference docs](/docs/reference/self-hosting-auth/start)
- Source code: [github.com/supabase/gotrue](https://github.com/supabase/gotrue)
- License: [MIT](https://github.com/supabase/gotrue/blob/master/LICENSE)
- Language: Go
@@ -80,7 +80,7 @@ A scalable WebSocket engine for managing user Presence, broadcasting messages, a
An S3-compatible object storage service that stores metadata in Postgres.
- Official Docs: [Supabase Storage reference docs](/docs/reference/storage)
- Official Docs: [Supabase Storage reference docs](/docs/reference/self-hosting-storage/start)
- Source code: [github.com/supabase/storage-api](https://github.com/supabase/storage-api)
- License: [Apache 2.0](https://github.com/supabase/storage-api/blob/master/LICENSE)
- Language: Node.js / TypeScript
@@ -10,7 +10,7 @@ This is a non-exhaustive list of features that Supabase provides for every proje
### Postgres database
Every project is a full Postgres database. [Docs](/docs/guides/database).
Every project is a full Postgres database. [Docs](/docs/guides/database/overview).
### Vector database
@@ -56,11 +56,11 @@ Enforce Postgres clients to connect via SSL. [Docs](/docs/guides/platform/ssl-en
### Branching
Use Supabase Branches to test and preview changes. [Docs](/docs/guides/platform/branching).
Use Supabase Branches to test and preview changes. [Docs](/docs/guides/deployment/branching).
### Terraform provider
Manage Supabase infrastructure via Terraform, an Infrastructure as Code tool. [Docs](/docs/guides/platform/terraform).
Manage Supabase infrastructure via Terraform, an Infrastructure as Code tool. [Docs](/docs/guides/deployment/terraform).
### Read replicas
@@ -68,7 +68,7 @@ Deploy read-only databases across multiple regions, for lower latency and better
### Log drains
Export Supabase logs to 3rd party providers and external tooling. [Docs](/docs/guides/platform/log-drains).
Export Supabase logs to third-party providers and external tooling. [Docs](/docs/guides/telemetry/log-drains).
## Studio
@@ -96,7 +96,7 @@ Synchronize shared state across your users, including online status and typing i
### Email login
Build email logins for your application or website. [Docs](/docs/guides/auth/auth-email).
Build email logins for your application or website. [Docs](/docs/guides/auth/passwords).
### Social login
@@ -108,7 +108,7 @@ Provide phone logins using a third-party SMS provider. [Docs](/docs/guides/auth/
### Passwordless login
Build passwordless logins via magic links for your application or website. [Docs](/docs/guides/auth/auth-magic-link).
Build passwordless logins via magic links for your application or website. [Docs](/docs/guides/auth/auth-email-passwordless).
### Authorization via Row Level Security
@@ -5,7 +5,7 @@ description: 'Learn how to use Supabase in your Android Kotlin App.'
This tutorial demonstrates how to build a basic product management app. The app demonstrates management operations, photo upload, account creation and authentication using:
- [Supabase Database](/docs/guides/database) - a Postgres database for storing your user data and [Row Level Security](/docs/guides/auth#row-level-security) so data is protected and users can only access their own information.
- [Supabase Database](/docs/guides/database/overview) - a Postgres database for storing your user data and [Row Level Security](/docs/guides/auth#row-level-security) so data is protected and users can only access their own information.
- [Supabase Auth](/docs/guides/auth) - users log in through magic links sent to their email (without having to set up a password).
- [Supabase Storage](/docs/guides/storage) - users can upload a profile photo.
@@ -35,7 +35,7 @@ Within your app's UI, redirect the user to [`https://api.supabase.com/v1/oauth/a
- `state`: Information about the state of your app. Note that `redirect_uri` and `state` together cannot exceed 4kB in size.
- `organization_slug`: The slug of the organization you want to connect to. This is optional, but if provided, it will pre-select the organization for the user.
- [Recommended] PKCE: We strongly recommend using the PKCE flow for increased security. Generate a random value before taking the user to the authorize endpoint. This value is called code verifier. Hash it with SHA256 and include it as the `code_challenge` parameter, while setting `code_challenge_method` to `S256`. In the next step, you would need to provide the code verifier to get the first access and refresh token.
- [Deprecated] `scope`: Scopes are configured when you create your OAuth app. Read the [docs](/docs/guides/platform/oauth-apps/oauth-scopes) for more details.
- [Deprecated] `scope`: Scopes are configured when you create your OAuth app. Read the [docs](/docs/guides/integrations/build-a-supabase-oauth-integration/oauth-scopes) for more details.
```ts
router.get('/connect-supabase/login', async (ctx) => {
@@ -7,15 +7,15 @@ subtitle: 'Scopes let you specify the level of access your integration needs'
<Admonition type="note">
Scopes are only available for OAuth apps. Check out [**our guide**](/docs/guides/platform/oauth-apps/build-a-supabase-integration) to learn how to build an OAuth app integration.
Scopes are only available for OAuth apps. Check out [**our guide**](/docs/guides/integrations/build-a-supabase-oauth-integration) to learn how to build an OAuth app integration.
</Admonition>
Scopes restrict access to the specific [Supabase Management API endpoints](/docs/reference/api/introduction) for OAuth tokens. All scopes can be specified as read and/or write.
Scopes are set when you [create an OAuth app](/docs/guides/platform/oauth-apps/build-a-supabase-integration#create-an-oauth-app) in the Supabase Dashboard.
Scopes are set when you [create an OAuth app](/docs/guides/integrations/build-a-supabase-oauth-integration#create-an-oauth-app) in the Supabase Dashboard.
You can update scopes of your OAuth app at any time, but existing OAuth app users will need to re-authorize your app via the [OAuth flow](/docs/guides/integrations/build-a-supabase-integration#implementing-the-oauth-20-flow) to apply the new scopes.
You can update scopes of your OAuth app at any time, but existing OAuth app users will need to re-authorize your app via the [OAuth flow](/docs/guides/integrations/build-a-supabase-oauth-integration#implementing-the-oauth-20-flow) to apply the new scopes.
## Available scopes
@@ -13,7 +13,7 @@ This document will guide you on best practices when using Supabase for your own
## Overview
All features of Supabase can be managed through the [Management API](/docs/reference/api/introduction) or the [remote MCP Server](/docs/guides/getting-started/mcp).
All features of Supabase can be managed through the [Management API](/docs/reference/api/introduction) or the [remote MCP Server](/docs/guides/ai-tools/mcp).
## Launching projects
@@ -384,7 +384,7 @@ Local logs rely on the Supabase Analytics Server which accesses the docker loggi
<Admonition type="note">
For advanced logs analysis using the Logs Explorer, it is advised to use the BigQuery backend instead of the default Postgres backend. Read about the steps [here](/docs/reference/self-hosting-analytics/introduction#bigquery).
For advanced logs analysis using the Logs Explorer, it is advised to use the BigQuery backend instead of the default Postgres backend. Read about the steps [here](/docs/reference/self-hosting-analytics/introduction#using-the-bigquery-backend).
</Admonition>
@@ -44,7 +44,7 @@ By default, Mailpit is available at [localhost:54324](http://localhost:54324) wh
### Going into production
The "default" email provided by Supabase is only for development purposes. It is [heavily restricted](/docs/guides/platform/going-into-prod#auth-rate-limits) to ensure that it is not used for spam. Before going into production, configure your own email provider by enabling SMTP credentials in your [project settings](/dashboard/project/_/auth/smtp).
The "default" email provided by Supabase is only for development purposes. It is [heavily restricted](/docs/guides/deployment/going-into-prod#auth-rate-limits) to ensure that it is not used for spam. Before going into production, configure your own email provider by enabling SMTP credentials in your [project settings](/dashboard/project/_/auth/smtp).
## Linting your database
@@ -10,7 +10,7 @@ The Supabase CLI uses a `config.toml` file to manage local configuration. This f
The `config.toml` file is automatically created when you run `supabase init`.
There are a wide variety of options available, which can be found in the [CLI Config Reference](/docs/guides/cli/config).
There are a wide variety of options available, which can be found in the [CLI Config Reference](/docs/guides/local-development/cli/config).
For example, to enable the "Apple" OAuth provider for local development, you can append the following information to `config.toml`:
+2 -2
View File
@@ -13,8 +13,8 @@ Visit [supabase.com/dashboard](/dashboard) and sign in to start creating project
Each project on Supabase comes with:
- A dedicated [Postgres database](/docs/guides/database)
- [Auto-generated APIs](/docs/guides/database/api)
- A dedicated [Postgres database](/docs/guides/database/overview)
- [Auto-generated APIs](/docs/guides/api)
- [Auth and user management](/docs/guides/auth)
- [Edge Functions](/docs/guides/functions)
- [Realtime API](/docs/guides/realtime)
@@ -12,7 +12,7 @@ subtitle: 'This documentation covers frequently asked questions around subscript
#### What are organizations and projects?
The Supabase Platform has "organizations" and "projects". An organization may contain multiple projects. Each project is a dedicated Supabase instance with all of its sub-services including Storage, Auth, Functions and Realtime.
Each organization only has a single subscription with a single plan (Free, Pro, Team or Enterprise). Project add-ons such as [Compute](/docs/guides/platform/compute-add-ons), [IPv4](/docs/guides/platform/ipv4-address), [Log Drains](/docs/guides/platform/log-drains), [Advanced MFA](/docs/guides/auth/auth-mfa/phone), [Custom Domains](/docs/guides/platform/custom-domains) and [PITR](/docs/guides/platform/backups#point-in-time-recovery) are configured per project and are added to your organization subscription.
Each organization only has a single subscription with a single plan (Free, Pro, Team or Enterprise). Project add-ons such as [Compute](/docs/guides/platform/compute-and-disk), [IPv4](/docs/guides/platform/ipv4-address), [Log Drains](/docs/guides/telemetry/log-drains), [Advanced MFA](/docs/guides/auth/auth-mfa/phone), [Custom Domains](/docs/guides/platform/custom-domains) and [PITR](/docs/guides/platform/backups#point-in-time-recovery) are configured per project and are added to your organization subscription.
Read more on [About billing on Supabase](/docs/guides/platform/billing-on-supabase#organization-based-billing).
@@ -54,7 +54,7 @@ Refer to our [Compute](/docs/guides/platform/manage-your-usage/compute#billing-e
#### How does compute billing work?
Each Supabase project is a dedicated VM and Postgres database. By default, your instance runs on the Micro compute instance. You have the option to upgrade your compute size in your [Project settings](/dashboard/project/_/settings/addons). See [Compute Add-ons](/docs/guides/platform/compute-add-ons) for available options.
Each Supabase project is a dedicated VM and Postgres database. By default, your instance runs on the Micro compute instance. You have the option to upgrade your compute size in your [Project settings](/dashboard/project/_/settings/addons). See [Compute Add-ons](/docs/guides/platform/compute-and-disk) for available options.
When you change your compute size, there are no immediate upfront charges. Instead, you will be billed based on the compute hours during your billing cycle reset.
@@ -132,7 +132,7 @@ The Fair Use Policy is applied through service restrictions. This could mean:
- Pausing projects
- Switching databases to read-only mode
- Disabling new project launches/transfers
- Responding with a [402 status code](/docs/guides/platform/http-status-codes#402-service-restriction) for all API requests
- Responding with a [402 status code](/docs/guides/troubleshooting/http-status-codes#402-service-restriction) for all API requests
The Fair Use Policy is generally applied to all projects of the restricted organization.
@@ -40,8 +40,8 @@ This example assumes your Supabase project is `abcdefghijklmnopqrst` with a corr
To get started:
1. [Install](/docs/guides/resources/supabase-cli) the latest version of the Supabase CLI.
2. [Log in](/docs/guides/cli/local-development#log-in-to-the-supabase-cli) to your Supabase account using the CLI.
1. [Install](/docs/guides/local-development) the latest version of the Supabase CLI.
2. [Log in](/docs/guides/local-development/database-migrations#log-in-to-the-supabase-cli) to your Supabase account using the CLI.
3. Ensure you have [Owner or Admin permissions](/docs/guides/platform/access-control#manage-team-members) for the project.
4. Get a custom domain from a DNS provider. Currently, only subdomains are supported.
- Use `api.example.com` instead of `example.com`.
@@ -152,8 +152,8 @@ Vanity subdomains allow you to present a basic branded experience, compared to c
To get started:
1. [Install](/docs/guides/resources/supabase-cli) the latest version of the Supabase CLI.
1. [Log in](/docs/guides/cli/local-development#log-in-to-the-supabase-cli) to your Supabase account using the CLI.
1. [Install](/docs/guides/local-development) the latest version of the Supabase CLI.
1. [Log in](/docs/guides/local-development/database-migrations#log-in-to-the-supabase-cli) to your Supabase account using the CLI.
1. Ensure that you have [Owner or Admin permissions](/docs/guides/platform/access-control#manage-team-members) for the project you'd like to set up a vanity subdomain for.
1. Ensure that your organization is on a paid plan (Pro/Team/Enterprise Plan) in the [Billing page of the Dashboard](/dashboard/org/_/billing).
@@ -21,7 +21,7 @@ The required project configuration is outlined in the [shared responsibility mod
These include:
- Enabling [Point in Time Recovery](/docs/guides/platform/backups#point-in-time-recovery) which requires at least a [small compute add-on](/docs/guides/platform/compute-add-ons).
- Enabling [Point in Time Recovery](/docs/guides/platform/backups#point-in-time-recovery) which requires at least a [small compute add-on](/docs/guides/platform/compute-and-disk).
- Turning on [SSL Enforcement](/docs/guides/platform/ssl-enforcement).
- Enabling [Network Restrictions](/docs/guides/platform/network-restrictions).
- Keeping [Postgres connection logging](/docs/guides/platform/postgres-connection-logging) enabled.
@@ -83,8 +83,8 @@ For more advanced migrations, including the use of a middleware server component
## Resources
- [Supabase vs Firebase](/alternatives/supabase-vs-firebase)
- [Firestore Data Migration](/docs/guides/migrations/firestore-data)
- [Firestore Storage Migration](/docs/guides/migrations/firebase-storage)
- [Firestore Data Migration](/docs/guides/platform/migrating-to-supabase/firestore-data)
- [Firestore Storage Migration](/docs/guides/platform/migrating-to-supabase/firebase-storage)
## Migrate to Supabase
@@ -62,8 +62,8 @@ If the bucket doesn't exist, it's created as a `non-public` bucket. You must set
## Resources
- [Supabase vs Firebase](/alternatives/supabase-vs-firebase)
- [Firestore Data Migration](/docs/guides/migrations/firestore-data)
- [Firebase Auth Migration](/docs/guides/migrations/firebase-auth)
- [Firestore Data Migration](/docs/guides/platform/migrating-to-supabase/firestore-data)
- [Firebase Auth Migration](/docs/guides/platform/migrating-to-supabase/firebase-auth)
## Migrate to Supabase
@@ -206,8 +206,8 @@ The result is two separate JSON files:
## Resources
- [Supabase vs Firebase](/alternatives/supabase-vs-firebase)
- [Firestore Storage Migration](/docs/guides/migrations/firebase-storage)
- [Firebase Auth Migration](/docs/guides/migrations/firebase-auth)
- [Firestore Storage Migration](/docs/guides/platform/migrating-to-supabase/firebase-storage)
- [Firebase Auth Migration](/docs/guides/platform/migrating-to-supabase/firebase-auth)
## Migrate to Supabase
@@ -27,9 +27,9 @@ To configure network restrictions with the dashboard:
To configure network restrictions with the CLI:
1. [Install](/docs/guides/cli) the Supabase CLI 1.22.0+.
1. [Log in](/docs/guides/cli/local-development#log-in-to-the-supabase-cli) to your Supabase account.
1. If your project was created before December 23, 2022, [upgrade it to the latest Supabase version](/docs/guides/platform/migrating-and-upgrading-projects) before using network restrictions.
1. [Install](/docs/guides/local-development) the Supabase CLI 1.22.0+.
1. [Log in](/docs/guides/local-development/database-migrations#log-in-to-the-supabase-cli) to your Supabase account.
1. If your project was created before December 23, 2022, [upgrade it to the latest Supabase version](/docs/guides/platform/upgrading) before using network restrictions.
1. Ensure you have [Owner or Admin permissions](/docs/guides/platform/access-control#manage-team-members) for the project.
### Check restrictions
@@ -101,5 +101,5 @@ To remove all network restrictions:
## Limitations
- Network restrictions apply to Postgres and the database pooler. They don't apply to HTTPS APIs such as PostgREST, Storage, and Auth, or to Supabase client libraries like [supabase-js](/docs/reference/javascript).
- With network restrictions applied, Edge functions lose direct access to the database. Use [supabase-js](/docs/reference/javascript) to connect to the database from Edge Functions instead.
- Network restrictions apply to Postgres and the database pooler. They don't apply to HTTPS APIs such as PostgREST, Storage, and Auth, or to Supabase client libraries like [supabase-js](/docs/reference/javascript/introduction).
- With network restrictions applied, Edge functions lose direct access to the database. Use [supabase-js](/docs/reference/javascript/introduction) to connect to the database from Edge Functions instead.
@@ -31,7 +31,7 @@ In such a scenario, you can consider:
You can use the [pg_stat_activity](https://www.postgresql.org/docs/current/monitoring-stats.html#MONITORING-PG-STAT-ACTIVITY-VIEW) view to debug which clients are holding open connections on your DB. `pg_stat_activity` only exposes information on direct connections to the database. Information on the number of connections to Supavisor is available [via the metrics endpoint](../telemetry/metrics).
Depending on the clients involved, you might be able to configure them to work with fewer connections (e.g. by imposing a limit on the maximum number of connections they're allowed to use), or shift specific workloads to connect via [Supavisor](/docs/guides/database/connecting-to-postgres#connection-pooler) instead. Transient workflows, which can scale up and down rapidly in response to traffic (e.g. serverless functions), can especially benefit from using a connection pooler rather than connecting to the DB directly.
Depending on the clients involved, you might be able to configure them to work with fewer connections (e.g. by imposing a limit on the maximum number of connections they're allowed to use), or shift specific workloads to connect via [Supavisor](/docs/guides/database/connecting-to-postgres#poolers) instead. Transient workflows, which can scale up and down rapidly in response to traffic (e.g. serverless functions), can especially benefit from using a connection pooler rather than connecting to the DB directly.
### Allowing higher number of connections
@@ -43,7 +43,7 @@ Target organization - the organization you want to move the project to
## Usage-billing and project add-ons
For usage metrics such as disk size, egress or image transformations and project add-ons such as [Compute Add-On](/docs/guides/platform/compute-add-ons), [Point-In-Time-Recovery](/docs/guides/platform/backups#point-in-time-recovery), [IPv4](/docs/guides/platform/ipv4-address), [Log Drains](/docs/guides/platform/log-drains), [Advanced MFA](/docs/guides/auth/auth-mfa/phone) or a [Custom Domain](/docs/guides/platform/custom-domains), the source organization will still be charged for the usage up until the transfer. The charges will be added to the invoice when the billing cycle resets.
For usage metrics such as disk size, egress or image transformations and project add-ons such as [Compute Add-On](/docs/guides/platform/compute-and-disk), [Point-In-Time-Recovery](/docs/guides/platform/backups#point-in-time-recovery), [IPv4](/docs/guides/platform/ipv4-address), [Log Drains](/docs/guides/telemetry/log-drains), [Advanced MFA](/docs/guides/auth/auth-mfa/phone) or a [Custom Domain](/docs/guides/platform/custom-domains), the source organization will still be charged for the usage up until the transfer. The charges will be added to the invoice when the billing cycle resets.
The target organization will be charged at the end of the billing cycle for usage after the project transfer.
@@ -15,11 +15,11 @@ Read Replicas are available for all projects on the Pro, Team and Enterprise pla
Projects must meet these requirements to use Read Replicas:
1. Running on AWS.
2. Running on at least a [Small compute add-on](/docs/guides/platform/compute-add-ons).
2. Running on at least a [Small compute add-on](/docs/guides/platform/compute-and-disk).
- Read Replicas are started on the same compute instance as the Primary to keep up with changes.
3. Running on Postgres 15+.
- For projects running on older versions of Postgres, you need to [upgrade to the latest platform version](/docs/guides/platform/migrating-and-upgrading-projects#pgupgrade).
- For projects running on older versions of Postgres, you need to [upgrade to the latest platform version](/docs/guides/platform/upgrading).
4. Not using [legacy logical backups](/docs/guides/platform/backups#point-in-time-recovery)
- Physical backups are automatically enabled if using [Point in time recovery (PITR)](/docs/guides/platform/backups#point-in-time-recovery)
@@ -110,7 +110,7 @@ Once the Primary database has completed restarting (or resizing, in case of a co
The following procedures require all Read Replicas for a project to be brought down before performing them:
1. [Project upgrades](/docs/guides/platform/migrating-and-upgrading-projects#pgupgrade)
1. [Project upgrades](/docs/guides/platform/upgrading)
2. [Data restorations](/docs/guides/platform/backups#pitr-restoration-process)
These operations need to complete before you can re-deploy Read Replicas.
@@ -61,8 +61,8 @@ curl -X PUT "https://api.supabase.com/v1/projects/$PROJECT_REF/ssl-enforcement"
To get started:
1. [Install](/docs/guides/cli) the Supabase CLI 1.37.0+.
1. [Log in](/docs/guides/getting-started/local-development#log-in-to-the-supabase-cli) to your Supabase account using the CLI.
1. [Install](/docs/guides/local-development) the Supabase CLI 1.37.0+.
1. [Log in](/docs/guides/local-development/database-migrations#log-in-to-the-supabase-cli) to your Supabase account using the CLI.
1. Ensure that you have [Owner or Admin permissions](/docs/guides/platform/access-control#manage-team-members) for the project that you are enabling SSL enforcement.
### Check enforcement status
@@ -61,7 +61,7 @@ height={625}
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Configure connection limit | Adjust the "Max concurrent connections" setting to increase or decrease the connection limit for your project | [Realtime Settings Guide](/docs/guides/realtime/settings) |
| Upgrade plan | Increase available client connections. Connection limits vary by plan: Free (200), Pro (500), Pro no spend cap (10,000), Team (10,000), Enterprise (10,000+) | [Pricing and Plans](/pricing) |
| Review quotas | Understand connection limits and other Realtime quotas for your plan | [Realtime Quotas Reference](/docs/guides/realtime/quotas) |
| Review quotas | Understand connection limits and other Realtime quotas for your plan | [Realtime Quotas Reference](/docs/guides/realtime/limits) |
| Understand connection quota | Learn how the concurrent connections quota works and how to configure it for your plan | [Concurrent Peak Connections Quota Troubleshooting](/docs/guides/troubleshooting/realtime-concurrent-peak-connections-quota-jdDqcp) |
| Fix silent disconnections | Fix connection issues in background applications using heartbeat callbacks and Web Workers | [Handling Silent Disconnections in Background Apps](/docs/guides/troubleshooting/realtime-handling-silent-disconnections-in-backgrounded-applications-592794) |
| Check logs | Investigate connection errors and quota errors in your project dashboard | [Realtime Logs Dashboard](/dashboard/project/_/database/realtime-logs) |
@@ -90,7 +90,7 @@ height={625}
| Action | Description | More information |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| Configure event limits | Adjust "Max events per second" and "Max payload size in KB" settings to optimize broadcast throughput and message size limits | [Realtime Settings Guide](/docs/guides/realtime/settings) |
| Review quotas | Understand message per second limits (Free: 100, Pro: 500, Pro no spend cap/Team/Enterprise: 2,500) and broadcast payload size limits (Free: 256 KB, Pro+: 3,000 KB) | [Realtime Quotas Reference](/docs/guides/realtime/quotas) |
| Review quotas | Understand message per second limits (Free: 100, Pro: 500, Pro no spend cap/Team/Enterprise: 2,500) and broadcast payload size limits (Free: 256 KB, Pro+: 3,000 KB) | [Realtime Quotas Reference](/docs/guides/realtime/limits) |
| Check logs | Investigate broadcast errors or quota limit issues in your project dashboard | [Realtime Logs Dashboard](/dashboard/project/_/database/realtime-logs) |
| Debug with logger | Enable logging to track messages sent and received, and diagnose broadcast delivery issues | [Debugging Realtime with Logger](/docs/guides/troubleshooting/realtime-debugging-with-logger) |
| Learn broadcast basics | Understand how to implement and optimize broadcast messaging in your application | [Broadcast Guide](/docs/guides/realtime/broadcast) |
@@ -119,7 +119,7 @@ height={625}
| Action | Description | More information |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| Configure presence limits | Adjust the "Max presence events per second" setting to optimize presence state update throughput | [Realtime Settings Guide](/docs/guides/realtime/settings) |
| Review quotas | Understand presence messages per second limits (Free: 20, Pro: 50, Pro no spend cap/Team/Enterprise: 1,000) and presence keys per object limits (10 for most plans) | [Realtime Quotas Reference](/docs/guides/realtime/quotas) |
| Review quotas | Understand presence messages per second limits (Free: 20, Pro: 50, Pro no spend cap/Team/Enterprise: 1,000) and presence keys per object limits (10 for most plans) | [Realtime Quotas Reference](/docs/guides/realtime/limits) |
| Check logs | Investigate presence errors or quota limit issues in your project dashboard | [Realtime Logs Dashboard](/dashboard/project/_/database/realtime-logs) |
| Debug with logger | Enable logging to track presence events and diagnose state synchronization issues | [Debugging Realtime with Logger](/docs/guides/troubleshooting/realtime-debugging-with-logger) |
| Learn presence basics | Understand how to implement and optimize presence state tracking in your application | [Presence Guide](/docs/guides/realtime/presence) |
@@ -147,7 +147,7 @@ height={625}
| Action | Description | More information |
| ------------------------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| Review quotas | Understand Postgres change payload size limits (1,024 KB for all plans) and message throughput limits | [Realtime Quotas Reference](/docs/guides/realtime/quotas) |
| Review quotas | Understand Postgres change payload size limits (1,024 KB for all plans) and message throughput limits | [Realtime Quotas Reference](/docs/guides/realtime/limits) |
| Check logs | Investigate Postgres Changes errors or performance issues in your project dashboard | [Realtime Logs Dashboard](/dashboard/project/_/database/realtime-logs) |
| Learn Postgres Changes | Understand limitations and best practices for using Postgres Changes | [Postgres Changes Guide](/docs/guides/realtime/postgres-changes) |
| Migrate to Broadcast | For better scalability, consider using Broadcast with database triggers instead of Postgres Changes | [Broadcast Guide](/docs/guides/realtime/broadcast) |
@@ -177,7 +177,7 @@ height={625}
| Action | Description | More information |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| Review quotas | Understand channel joins per second limits (Free: 100, Pro: 500, Pro no spend cap/Team/Enterprise: 2,500) and channels per connection limits (100 for most plans) | [Realtime Quotas Reference](/docs/guides/realtime/quotas) |
| Review quotas | Understand channel joins per second limits (Free: 100, Pro: 500, Pro no spend cap/Team/Enterprise: 2,500) and channels per connection limits (100 for most plans) | [Realtime Quotas Reference](/docs/guides/realtime/limits) |
| Check logs | Investigate `too_many_joins` errors or channel join failures in your project dashboard | [Realtime Logs Dashboard](/dashboard/project/_/database/realtime-logs) |
| Fix channel errors | Learn how to properly manage channel lifecycle and prevent channel leaks in your application | [TooManyChannels Error Troubleshooting](/docs/guides/troubleshooting/realtime-too-many-channels-error) |
| Learn channel basics | Understand how Realtime channels work and best practices for channel management | [Realtime Channels Concepts](/docs/guides/realtime/concepts#channels) |
@@ -206,7 +206,7 @@ height={625}
| Action | Description | More information |
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| Configure payload limits | Adjust the "Max payload size in KB" setting to increase or decrease the maximum message size allowed | [Realtime Settings Guide](/docs/guides/realtime/settings) |
| Review quotas | Understand payload size limits: Broadcast (Free: 256 KB, Pro+: 3,000 KB) and Postgres Changes (1,024 KB for all plans) | [Realtime Quotas Reference](/docs/guides/realtime/quotas) |
| Review quotas | Understand payload size limits: Broadcast (Free: 256 KB, Pro+: 3,000 KB) and Postgres Changes (1,024 KB for all plans) | [Realtime Quotas Reference](/docs/guides/realtime/limits) |
| Check logs | Investigate payload-related errors or performance issues in your project dashboard | [Realtime Logs Dashboard](/dashboard/project/_/database/realtime-logs) |
| Review benchmarks | Understand how payload size affects latency and throughput (larger payloads increase latency) | [Payload Size Performance Benchmarks](/docs/guides/realtime/benchmarks#broadcast-impact-of-payload-size) |
| Debug query performance | Use `explain()` to analyze queries and identify performance bottlenecks that may be causing large payloads | [Query Performance Debugging Guide](/docs/guides/database/debugging-performance) |
@@ -369,7 +369,7 @@ height={645}
| Learn HTTP status codes | Learn about HTTP status codes including 4XX client errors and 5XX server errors | [HTTP Status Codes Troubleshooting](/docs/guides/troubleshooting/http-status-codes) |
| Fix timeout errors | Resolve WebSocket timeout errors caused by Node.js version incompatibility | [TIMED_OUT Connection Errors Troubleshooting](/docs/guides/troubleshooting/realtime-connections-timed_out-status) |
| Understand heartbeats | Monitor heartbeat status to detect connection issues and handle timeouts | [Realtime Heartbeats Guide](/docs/guides/troubleshooting/realtime-heartbeat-messages) |
| Review quotas | Check if errors are related to quota limits (e.g., `too_many_connections`, `too_many_joins`) | [Realtime Quotas Reference](/docs/guides/realtime/quotas) |
| Review quotas | Check if errors are related to quota limits (e.g., `too_many_connections`, `too_many_joins`) | [Realtime Quotas Reference](/docs/guides/realtime/limits) |
| Learn authorization | Troubleshoot authorization-related errors for private channels | [Realtime Authorization Guide](/docs/guides/realtime/authorization) |
| Contact support | Get assistance with persistent errors or investigate service-level issues | [Support Portal](/dashboard/support/new) |
@@ -73,6 +73,6 @@ Supabase updates these troubleshooting guides continuously, so treat this table
| Webhook not firing; `pg_cron` job not running; `pg_net` queue stuck; `42501 ... http_request_queue` | Database jobs → `postgres_logs` | [Webhook debugging](/docs/guides/troubleshooting/webhook-debugging-guide-M8sk47) · [pg_cron debugging](/docs/guides/troubleshooting/pgcron-debugging-guide-n1KTaz) · [42501 http_request_queue](/docs/guides/troubleshooting/42501--permission-denied-for-table-httprequestqueue-KnozmQ) |
| Reading or querying logs; interpreting Postgres logs; finding API errors in logs; reading metrics | Diagnostics → any log source | [Logging guide](/docs/guides/telemetry/logs) · [Interpret Postgres logs](/docs/guides/troubleshooting/how-to-interpret-and-explore-the-postgres-logs-OuCIOj) · [API errors in logs](/docs/guides/troubleshooting/discovering-and-interpreting-api-errors-in-the-logs-7xREI9) · [Logging levels](/docs/guides/troubleshooting/understanding-postgresql-logging-levels-and-how-they-impact-your-project-KXiJRm) · [View database metrics](/docs/guides/troubleshooting/how-to-view-database-metrics-uqf2z_) |
For query performance and schema-design questions such as indexing, `EXPLAIN`, N+1 queries, or partitioning, see the [Postgres guides](/docs/guides/database).
For query performance and schema-design questions such as indexing, `EXPLAIN`, N+1 queries, or partitioning, see the [Postgres guides](/docs/guides/database/overview).
Debugging is complete only once you've re-run the failing operation, confirmed it succeeds, and checked that the layer's logs show a clean result.
+1 -1
View File
@@ -306,7 +306,7 @@ order by n desc
limit 100;
```
If you use the [Supabase MCP server](/docs/guides/getting-started/mcp), the `query_logs` tool runs a custom ClickHouse query like the ones above on hosted projects. The `get_logs` tool returns a service's recent logs without SQL; it is deprecated on hosted projects in favor of `query_logs`, and remains the option for local and self-hosted projects.
If you use the [Supabase MCP server](/docs/guides/ai-tools/mcp), the `query_logs` tool runs a custom ClickHouse query like the ones above on hosted projects. The `get_logs` tool returns a service's recent logs without SQL; it is deprecated on hosted projects in favor of `query_logs`, and remains the option for local and self-hosted projects.
### LIMIT and result row limitations
@@ -36,7 +36,7 @@ While pointing out the exact cause for egress may not be straightforward, there
- Reduce the number of queries/calls by optimising client code or use caches to reduce the number of requests/queries being done: https://github.com/psteinroe/supabase-cache-helpers/
- In case of update/insert queries, if you don't need the entire row to be returned, configure your ORM/queries to not return the entire row
- In case of running manual backups through Supavisor, remove unneeded tables and/or reduce the frequency
- For Storage, if you start using the [Smart CDN](/docs/guides/storage/cdn/smart-cdn) Storage Egress usage can be reduced. You can also use the [Supabase Image Transformations](/docs/guides/storage/image-transformations) to optimize the images and reduce the egress.
- For Storage, if you start using the [Smart CDN](/docs/guides/storage/cdn/smart-cdn) Storage Egress usage can be reduced. You can also use the [Supabase Image Transformations](/docs/guides/storage/serving/image-transformations) to optimize the images and reduce the egress.
**Cached vs uncached egress**
@@ -11,7 +11,7 @@ database_id = "4a41e734-6883-452f-bc8e-82ff4ac22a81"
You can run this query to check the current settings set for your roles: `SELECT rolname, rolconfig FROM   pg_roles;`
To increase the `statement_timeout` for a specific role, you may follow the instructions [here](/docs/guides/database/timeouts#changing-the-default-timeout). Note that it may require a quick reboot for the changes to take effect.
To increase the `statement_timeout` for a specific role, you may follow the instructions [here](/docs/guides/database/postgres/timeouts#role-level). Note that it may require a quick reboot for the changes to take effect.
Additionally, to check how long a query is taking, you can check the Query Performance report which can give you more information on the query's performance: https://app.supabase.com/project/_/advisors/query-performance. You can use the [query plan analyzer](https://www.postgresql.org/docs/current/sql-explain.html) on any expensive queries that you have identified: `explain analyze <query-statement-here>;`. For supabase-js/ PostgREST queries you can use `.explain()`.
@@ -17,4 +17,4 @@ To overcome this, the connections need to be optimized as mentioned here: https:
Additionally, you can try using the connection pool to help solve this issue:
https://supabase.com/docs/guides/database/connecting-to-postgres#connection-pooler
If you're already using connection pooling and still hitting the maximum connections, then it is suggested to upgrade your compute add-on that allows more connections: https://supabase.com/docs/guides/platform/compute-add-ons
If you're already using connection pooling and still hitting the maximum connections, then it is suggested to upgrade your compute add-on that allows more connections: https://supabase.com/docs/guides/platform/compute-and-disk
@@ -7,7 +7,7 @@ keywords = [ "grafana", "docker", "metrics", "configuration" ]
database_id = "76a4099e-450f-4b5b-a539-224760348c18"
---
This guide is for identifying configuration mistakes in [self-hosted Supabase Grafana installations](/docs/guides/monitoring-troubleshooting/metrics#deploying-supabase-grafana)
This guide is for identifying configuration mistakes in [self-hosted Supabase Grafana installations](/docs/guides/telemetry/metrics/grafana-self-hosted)
## Step 1: Ping your Grafana endpoint
@@ -14,7 +14,7 @@ cli = [ "supabase-postgres-config-update" ]
## Changing max database connections
Each compute instance has a default direct connection and pooler connection settings. You can find the most recent settings in the [compute docs](/docs/guides/platform/compute-add-ons#disk-io):
Each compute instance has a default direct connection and pooler connection settings. You can find the most recent settings in the [compute docs](/docs/guides/platform/compute-and-disk#disk):
| Compute Size | Direct Connections | Pooler Connections |
| ------------ | ------------------ | ------------------ |
@@ -34,7 +34,7 @@ Each compute instance has a default direct connection and pooler connection sett
> Note: the Supavisor connection limits are hard-coded and cannot be changed without upgrading the compute size:
You can configure the maximum amount of connections that Postgres will tolerate with the [Supabase CLI.](/docs/guides/platform/custom-postgres-config)
You can configure the maximum amount of connections that Postgres will tolerate with the [Supabase CLI.](/docs/guides/database/custom-postgres-config)
You can run the following commands:
@@ -83,7 +83,7 @@ To avoid displacing cache or straining system resources, it is advised to not in
Postgres will allow you to overcommit memory. You can run the below query to find out the hypothetical max value you could change it to without risking memory failure:
> NOTE: You can find your server memory in the [compute add-ons docs](/docs/guides/platform/compute-add-ons)
> NOTE: You can find your server memory in the [compute add-ons docs](/docs/guides/platform/compute-and-disk)
```sql
select
@@ -50,7 +50,7 @@ See the [Fair Use Policy](/docs/guides/platform/billing-faq#fair-use-policy) sec
5XX status codes indicate that the project was unable to process the request successfully, but not because of an issue with the client's request.
5XX status codes can be the result of the project not having enough [compute](/docs/guides/platform/compute-add-ons) to process a complex request being made by a client or not being able to keep up with the volume of requests made against the project.
5XX status codes can be the result of the project not having enough [compute](/docs/guides/platform/compute-and-disk) to process a complex request being made by a client or not being able to keep up with the volume of requests made against the project.
### 54X project errors
@@ -7,7 +7,7 @@ keywords = [ "cpu", "grafana", "metrics" ]
database_id = "ef05da0a-f8bc-44a4-9719-5ae811dba104"
---
> [Guide](/docs/guides/monitoring-troubleshooting/metrics#deploying-supabase-grafana) for setting up Supabase Grafana
> [Guide](/docs/guides/telemetry/metrics/grafana-self-hosted) for setting up Supabase Grafana
## CPU
@@ -35,5 +35,5 @@ As the CPU peaks towards 100%, queries and database tasks will begin to throttle
1. [Optimize your queries](/docs/guides/database/query-optimization).
2. [Add indexes](https://github.com/orgs/supabase/discussions/22449) if possible.
3. [Increasing the compute size](/docs/guides/platform/compute-add-ons)
3. [Increasing the compute size](/docs/guides/platform/compute-and-disk)
4. [Distribute load by using read-replicas](/dashboard/project/_/settings/infrastructure)
@@ -67,6 +67,6 @@ If the output from these commands does not help resolve the issue, open a suppor
## Additional resources
- [Local development guide](/docs/guides/cli/local-development)
- [Local development guide](/docs/guides/local-development/database-migrations)
- [Edge Functions quickstart](/docs/guides/functions/quickstart)
- [Debugging Edge Functions](/docs/guides/functions/logging)
@@ -58,5 +58,5 @@ KONG_NGINX_WORKER_PROCESSES=auto supabase start
## Additional resources
- [Local development guide](/docs/guides/cli/local-development)
- [Local development guide](/docs/guides/local-development/database-migrations)
- [CLI repository](https://github.com/supabase/cli)
@@ -106,5 +106,5 @@ They're all intertwined to some extent. If IO, CPU, or Memory are constrained, t
- [Using SQLAlchemy with Supabase](https://github.com/orgs/supabase/discussions/27071)
- [Supabase and IPv4/IPv6 compatibility ](https://github.com/orgs/supabase/discussions/27034)
- [Addressing Max Client Errors](https://github.com/orgs/supabase/discussions/22305)
- [Connecting to your database](/docs/guides/database/connecting-to-postgres#integrations)
- [Connecting to your database](/docs/guides/database/connecting-to-postgres#quickstarts)
- [How to Change Max Database Connections](https://github.com/orgs/supabase/discussions/27197)
@@ -7,7 +7,7 @@ keywords = [ "smtp", "email", "delivery", "logs", "provider", "firewalls" ]
database_id = "98e3b318-ad9a-41f5-ada0-44b61970ab4f"
---
**We strongly recommend configuring your own custom SMTP provider** in your projects to avoid running into issues with sending emails from your project. The built-in email provider is for demonstration purposes only and offers a very low rate limit. You can read more details about the rate limits [here](/docs/guides/platform/going-into-prod#auth-rate-limits).
**We strongly recommend configuring your own custom SMTP provider** in your projects to avoid running into issues with sending emails from your project. The built-in email provider is for demonstration purposes only and offers a very low rate limit. You can read more details about the rate limits [here](/docs/guides/deployment/going-into-prod#auth-rate-limits).
If you're testing your Supabase projects, consider configuring an email testing tool like [Mailtrap](https://mailtrap.io/) to test your emails. It's an email sandbox tool that helps debug emails without sending an email to an end user.
@@ -16,7 +16,7 @@ If a project is under 500MB, you can [transfer it to be under a free organizatio
Alternatively, you can download a [daily backup](/dashboard/project/_/database/backups/scheduled) of only your database for archiving. You can also manually download a .SQL file of your database and storage buckets by following this [guide](/docs/guides/platform/migrating-within-supabase/backup-restore).
You can also download your storage buckets with the [Supabase CLI:](/docs/guides/cli/getting-started?queryGroups=platform&platform=npx)
You can also download your storage buckets with the [Supabase CLI:](/docs/guides/local-development/cli/getting-started?queryGroups=platform&platform=npx)
```sql
npx supabase login
@@ -114,7 +114,7 @@ You can view your concurrent peak connection usage throughout the day at the bot
Unfortunately, excessive resource strain can slow down or disrupt jobs.
Go to the [reports page](/dashboard/project/_/observability/database) (or [Supabase Grafana](/docs/guides/monitoring-troubleshooting/metrics#deploying-supabase-grafana) if you have it setup), and check for signs of resource exhaustion. If it's clear your database is under pressure, consider upgrading your compute add-on or following the advice from one of the optimization guides:
Go to the [reports page](/dashboard/project/_/observability/database) (or [Supabase Grafana](/docs/guides/telemetry/metrics/grafana-self-hosted) if you have it setup), and check for signs of resource exhaustion. If it's clear your database is under pressure, consider upgrading your compute add-on or following the advice from one of the optimization guides:
- [Connections](https://github.com/orgs/supabase/discussions/27141)
- [Disk/IO](https://github.com/orgs/supabase/discussions/27003)
@@ -152,7 +152,7 @@ order by timestamp desc
limit 100;
```
If you're interested in modifying the query, there is an advanced [guide](https://github.com/orgs/supabase/discussions/26224) for navigating the Postgres logs and a general purpose [one](/docs/guides/platform/advanced-log-filtering) for applying filters.
If you're interested in modifying the query, there is an advanced [guide](https://github.com/orgs/supabase/discussions/26224) for navigating the Postgres logs and a general purpose [one](/docs/guides/telemetry/advanced-log-filtering) for applying filters.
<br />
@@ -59,7 +59,7 @@ where seq_scan + idx_scan > 0
order by n_live_tup desc;
```
A lot of the [queries for inspecting performance](/docs/reference/cli/supabase-inspect-db) are pre-bundled as part of the [Supabase CLI](/docs/guides/cli/getting-started). For instance, there is a command for testing which indexes of yours are unnecessary and are needlessly taking up space:
A lot of the [queries for inspecting performance](/docs/reference/cli/supabase-inspect-db) are pre-bundled as part of the [Supabase CLI](/docs/guides/local-development/cli/getting-started). For instance, there is a command for testing which indexes of yours are unnecessary and are needlessly taking up space:
```bash
npx supabase login
@@ -44,7 +44,7 @@ If the cache hit rate begins to drop below the ideal amount, one should consider
Optimizing:
1. [Apply indexes](https://github.com/orgs/supabase/discussions/22449): can reduce the amount of data pulled from disk into memory
2. [Increasing the compute size](/docs/guides/platform/compute-add-ons)
2. [Increasing the compute size](/docs/guides/platform/compute-and-disk)
3. [Distribute load by using read-replicas](/dashboard/project/_/settings/infrastructure)
4. [Partitions](/docs/guides/database/partitions): Generally should be used on _very_ large tables to minimize data pulled from disk into memory
5. [Remove bloat](/docs/reference/cli/supabase-inspect-db): Bloat can fragment data across pages, causing redundant data to be pulled from disk.
@@ -2353,7 +2353,7 @@
{
"id": "auth",
"title": "Overview",
"notes": "- The auth methods can be accessed via the `supabase.auth` namespace.\n- By default, the supabase client sets `persistSession` to true and attempts to store the session in local storage. When using the supabase client in an environment that doesn't support local storage, you might notice the following warning message being logged:\n\n > No storage option exists to persist the session, which may result in unexpected behavior when using auth. If you want to set `persistSession` to true, please provide a storage option or you may set `persistSession` to false to disable this warning.\n\n This warning message can be safely ignored if you're not using auth on the server-side. If you are using auth and you want to set `persistSession` to true, you will need to provide a custom storage implementation that follows [this interface](https://github.com/supabase/supabase-js/blob/master/packages/core/auth-js/src/lib/types.ts#L1053).\n- Any email links and one-time passwords (OTPs) sent have a default expiry of 24 hours. We have the following [rate limits](/docs/guides/platform/going-into-prod#auth-rate-limits) in place to guard against brute force attacks.\n- The expiry of an access token can be set in the \"JWT expiry limit\" field in [your project's auth settings](/dashboard/project/_/auth/providers). A refresh token never expires and can only be used once.\n",
"notes": "- The auth methods can be accessed via the `supabase.auth` namespace.\n- By default, the supabase client sets `persistSession` to true and attempts to store the session in local storage. When using the supabase client in an environment that doesn't support local storage, you might notice the following warning message being logged:\n\n > No storage option exists to persist the session, which may result in unexpected behavior when using auth. If you want to set `persistSession` to true, please provide a storage option or you may set `persistSession` to false to disable this warning.\n\n This warning message can be safely ignored if you're not using auth on the server-side. If you are using auth and you want to set `persistSession` to true, you will need to provide a custom storage implementation that follows [this interface](https://github.com/supabase/supabase-js/blob/master/packages/core/auth-js/src/lib/types.ts#L1053).\n- Any email links and one-time passwords (OTPs) sent have a default expiry of 24 hours. We have the following [rate limits](/docs/guides/deployment/going-into-prod#auth-rate-limits) in place to guard against brute force attacks.\n- The expiry of an access token can be set in the \"JWT expiry limit\" field in [your project's auth settings](/dashboard/project/_/auth/providers). A refresh token never expires and can only be used once.\n",
"examples": [
{
"id": "create-auth-client",
+1 -1
View File
@@ -467,7 +467,7 @@ parameters:
An array of files or glob patterns to find seeds in.
links:
- name: 'Seeding your database'
link: 'https://supabase.com/docs/guides/cli/seeding-your-database'
link: 'https://supabase.com/docs/guides/local-development/seeding-your-database'
- id: 'realtime.enabled'
title: 'realtime.enabled'
@@ -1,7 +1,7 @@
{
"id": "auth",
"title": "Overview",
"notes": "- The auth methods can be accessed via the `supabase.auth` namespace.\n- By default, the supabase client sets `persistSession` to true and attempts to store the session in local storage. When using the supabase client in an environment that doesn't support local storage, you might notice the following warning message being logged:\n\n > No storage option exists to persist the session, which may result in unexpected behavior when using auth. If you want to set `persistSession` to true, please provide a storage option or you may set `persistSession` to false to disable this warning.\n\n This warning message can be safely ignored if you're not using auth on the server-side. If you are using auth and you want to set `persistSession` to true, you will need to provide a custom storage implementation that follows [this interface](https://github.com/supabase/supabase-js/blob/master/packages/core/auth-js/src/lib/types.ts#L1053).\n- Any email links and one-time passwords (OTPs) sent have a default expiry of 24 hours. We have the following [rate limits](/docs/guides/platform/going-into-prod#auth-rate-limits) in place to guard against brute force attacks.\n- The expiry of an access token can be set in the \"JWT expiry limit\" field in [your project's auth settings](/dashboard/project/_/auth/providers). A refresh token never expires and can only be used once.\n",
"notes": "- The auth methods can be accessed via the `supabase.auth` namespace.\n- By default, the supabase client sets `persistSession` to true and attempts to store the session in local storage. When using the supabase client in an environment that doesn't support local storage, you might notice the following warning message being logged:\n\n > No storage option exists to persist the session, which may result in unexpected behavior when using auth. If you want to set `persistSession` to true, please provide a storage option or you may set `persistSession` to false to disable this warning.\n\n This warning message can be safely ignored if you're not using auth on the server-side. If you are using auth and you want to set `persistSession` to true, you will need to provide a custom storage implementation that follows [this interface](https://github.com/supabase/supabase-js/blob/master/packages/core/auth-js/src/lib/types.ts#L1053).\n- Any email links and one-time passwords (OTPs) sent have a default expiry of 24 hours. We have the following [rate limits](/docs/guides/deployment/going-into-prod#auth-rate-limits) in place to guard against brute force attacks.\n- The expiry of an access token can be set in the \"JWT expiry limit\" field in [your project's auth settings](/dashboard/project/_/auth/providers). A refresh token never expires and can only be used once.\n",
"examples": [
{
"id": "create-auth-client",
+4 -4
View File
@@ -277,7 +277,7 @@ functions:
name: Sign up with redirect URL
isSpotlight: true
description: |
- See [redirect URLs and wildcards](/docs/guides/auth#redirect-urls-and-wildcards) to add additional redirect URLs to your project.
- See [redirect URLs and wildcards](/docs/guides/auth/redirect-urls#use-wildcards-in-redirect-urls) to add additional redirect URLs to your project.
code: |
```dart
final AuthResponse res = await supabase.auth.signUp(
@@ -841,7 +841,7 @@ functions:
- id: sign-in-with-sso
title: 'signInWithSSO()'
notes: |
- Before you can call this method you need to [establish a connection](/docs/guides/auth/sso/auth-sso-saml#managing-saml-20-connections) to an identity provider. Use the [CLI commands](/docs/reference/cli/supabase-sso) to do this.
- Before you can call this method you need to [establish a connection](/docs/guides/auth/enterprise-sso/auth-sso-saml#managing-saml-20-connections) to an identity provider. Use the [CLI commands](/docs/reference/cli/supabase-sso) to do this.
- If you've associated an email domain to the identity provider, you can use the `domain` property to start a sign-in flow.
- In case you need to use a different way to start the authentication flow with an identity provider, you can use the `providerId` property. For example:
- Mapping specific user email addresses with an identity provider.
@@ -1738,8 +1738,8 @@ functions:
notes: |
- `setSession()` takes in a refresh token and uses it to get a new session.
- The refresh token can only be used once to obtain a new session.
- [Refresh token rotation](/docs/guides/cli/config#auth.enable_refresh_token_rotation) is enabled by default on all projects to guard against replay attacks.
- You can configure the [`REFRESH_TOKEN_REUSE_INTERVAL`](/docs/guides/cli/config#auth.refresh_token_reuse_interval) which provides a short window in which the same refresh token can be used multiple times in the event of concurrency or offline issues.
- [Refresh token rotation](/docs/guides/local-development/cli/config#auth.enable_refresh_token_rotation) is enabled by default on all projects to guard against replay attacks.
- You can configure the [`REFRESH_TOKEN_REUSE_INTERVAL`](/docs/guides/local-development/cli/config#auth.refresh_token_reuse_interval) which provides a short window in which the same refresh token can be used multiple times in the event of concurrency or offline issues.
params:
- name: refreshToken
isOptional: false
+3 -3
View File
@@ -198,7 +198,7 @@ functions:
Sometimes you want to control where the user is redirected to after they are logged in. Supabase supports this for
any URL path on your website (the URL must either be on the same domain as your [Site URL](https://supabase.com/dashboard/project/_/auth/url-configuration) or match one of the Redirect URLs).
See [redirect URLs and wildcards](/docs/guides/auth/overview#redirect-urls-and-wildcards) to add additional redirect URLs to your project.
See [redirect URLs and wildcards](/docs/guides/auth/redirect-urls#use-wildcards-in-redirect-urls) to add additional redirect URLs to your project.
code: |
```js
const { user, session, error } = await supabase.auth.signIn({
@@ -569,7 +569,7 @@ functions:
Sends a password reset request to an email address.
- When the user clicks the reset link in the email they are redirected back to your application.
You can configure the URL that the user is redirected to via the `redirectTo` param.
See [redirect URLs and wildcards](/docs/guides/auth/overview#redirect-urls-and-wildcards) to add additional redirect URLs to your project.
See [redirect URLs and wildcards](/docs/guides/auth/redirect-urls#use-wildcards-in-redirect-urls) to add additional redirect URLs to your project.
- After the user has been redirected successfully, prompt them for a new password and call `updateUser()`:
```js
const { data, error } = await supabase.auth.update({
@@ -1122,7 +1122,7 @@ functions:
title: 'on().subscribe()'
$ref: '@supabase/supabase-js.lib/SupabaseQueryBuilder.SupabaseQueryBuilder.on'
notes: |
- Realtime is disabled by default for new Projects for better database performance and security. You can turn it on by [managing replication](/docs/guides/database/api#managing-realtime).
- Realtime is disabled by default for new Projects for better database performance and security. You can turn it on by [managing replication](/docs/guides/api).
- If you want to receive the "previous" data for updates and deletes, you will need to set `REPLICA IDENTITY` to `FULL`, like this: `ALTER TABLE your_table REPLICA IDENTITY FULL;`
examples:
- id: listen-to-all-database-changes
+1 -1
View File
@@ -23,7 +23,7 @@ functions:
> No storage option exists to persist the session, which may result in unexpected behavior when using auth. If you want to set `persistSession` to true, please provide a storage option or you may set `persistSession` to false to disable this warning.
This warning message can be safely ignored if you're not using auth on the server-side. If you are using auth and you want to set `persistSession` to true, you will need to provide a custom storage implementation that follows [this interface](https://github.com/supabase/supabase-js/blob/master/packages/core/auth-js/src/lib/types.ts#L1053).
- Any email links and one-time passwords (OTPs) sent have a default expiry of 24 hours. We have the following [rate limits](/docs/guides/platform/going-into-prod#auth-rate-limits) in place to guard against brute force attacks.
- Any email links and one-time passwords (OTPs) sent have a default expiry of 24 hours. We have the following [rate limits](/docs/guides/deployment/going-into-prod#auth-rate-limits) in place to guard against brute force attacks.
- The expiry of an access token can be set in the "JWT expiry limit" field in [your project's auth settings](/dashboard/project/_/auth/providers). A refresh token never expires and can only be used once.
examples:
- id: create-auth-client
+5 -5
View File
@@ -2141,7 +2141,7 @@ functions:
- id: sign-up-with-redirect
name: Sign up with a redirect URL
description: |
- See [redirect URLs and wildcards](/docs/guides/auth/overview#redirect-urls-and-wildcards) to add additional redirect URLs to your project.
- See [redirect URLs and wildcards](/docs/guides/auth/redirect-urls#use-wildcards-in-redirect-urls) to add additional redirect URLs to your project.
code: |
```kotlin
val user = supabase.gotrue.signUpWith(Email, redirectUrl = "https://example.com") {
@@ -2203,7 +2203,7 @@ functions:
- If you're using an email, you can configure whether you want the user to receive a magiclink or a OTP.
- If you're using phone, you can configure whether you want the user to receive a OTP.
- The magic link's destination URL is determined by the [`SITE_URL`](/docs/guides/auth/redirect-urls).
- See [redirect URLs and wildcards](/docs/guides/auth/overview#redirect-urls-and-wildcards) to add additional redirect URLs to your project.
- See [redirect URLs and wildcards](/docs/guides/auth/redirect-urls#use-wildcards-in-redirect-urls) to add additional redirect URLs to your project.
- To learn how to handle OTP links & OAuth refer to [initializing](/docs/reference/kotlin/initializing)
- Magic links and OTPs share the same implementation. To send users a one-time code instead of a magic link, [modify the magic link email template](https://supabase.com/dashboard/project/_/auth/templates) to include `{{ .Token }}` instead of `{{ .ConfirmationURL }}`.
examples:
@@ -2257,7 +2257,7 @@ functions:
isSpotlight: false
description: |
- When the third-party provider successfully authenticates the user, the provider redirects the user to the URL specified in the `redirectUrl` parameter. This parameter defaults to the [`SITE_URL`](/docs/guides/auth/redirect-urls). It does not redirect the user immediately after invoking this method.
- See [redirect URLs and wildcards](/docs/guides/auth/overview#redirect-urls-and-wildcards) to add additional redirect URLs to your project.
- See [redirect URLs and wildcards](/docs/guides/auth/redirect-urls#use-wildcards-in-redirect-urls) to add additional redirect URLs to your project.
- oAuthUrl() provides the URL which needs to be opened in a browser.
- The redirectTo URL needs to be setup correctly in your project under Authentication -> URL Configuration -> Redirect URLs.
- To see how you can use a custom in-app browser on Android, check our [demo](https://github.com/supabase-community/supabase-kt/tree/development/demos/android-login) on GitHub.
@@ -2281,7 +2281,7 @@ functions:
title: 'signInWithSSO()'
$ref: '@supabase/gotrue-js.GoTrueClient.signInWithSSO'
notes: |
- Before you can call this method you need to [establish a connection](/docs/guides/auth/sso/auth-sso-saml#managing-saml-20-connections) to an identity provider. Use the [CLI commands](/docs/reference/cli/supabase-sso) to do this.
- Before you can call this method you need to [establish a connection](/docs/guides/auth/enterprise-sso/auth-sso-saml#managing-saml-20-connections) to an identity provider. Use the [CLI commands](/docs/reference/cli/supabase-sso) to do this.
- If you've associated an email domain to the identity provider, you can use the `SSO.withDomain()` function in the `loginWith` method to start a sign-in flow.
- In case you need to use a different way to start the authentication flow with an identity provider, you can use the `SSO.withProviderId` function. For example:
- Mapping specific user email addresses with an identity provider.
@@ -3109,7 +3109,7 @@ functions:
Subscribe to realtime changes in your database.
title: 'on().subscribe()'
notes: |
- Realtime is disabled by default for new Projects for better database performance and security. You can turn it on by [managing replication](/docs/guides/database/api#managing-realtime).
- Realtime is disabled by default for new Projects for better database performance and security. You can turn it on by [managing replication](/docs/guides/api).
- If you want to receive the "previous" data for updates and deletes, you will need to set `REPLICA IDENTITY` to `FULL`, like this: `ALTER TABLE your_table REPLICA IDENTITY FULL;`
- When using a method with a generic type like `track`, `broadcast` or `broadcastFlow`, you have to provide a [serializable class](/docs/reference/kotlin/installing#serialization) as the type parameter.
examples:
Loaded 100 of 105 files, more files were not shown because too many files have changed in this diff. Show more