chore: replace all supabase urls with relative urls (#38537)

* fix: rewrite relative URLs when syncing to GitHub discussion

Relative URLs back to supabse.com won't work in GitHub discussions, so
rewrite them back to absolute URLs starting with https://supabase.com

* fix: replace all supabase urls with relative urls

* chore: add linting for relative urls

* chore: bump linter version

* Prettier

---------

Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>
This commit is contained in:
Charis
2025-09-09 08:54:33 -04:00
committed by GitHub
parent fb8905390c
commit 47705a8968
311 changed files with 952 additions and 912 deletions

View File

@@ -31,10 +31,10 @@ jobs:
~/.cargo/registry/index/ ~/.cargo/registry/index/
~/.cargo/registry/cache/ ~/.cargo/registry/cache/
~/.cargo/git/db/ ~/.cargo/git/db/
key: 3186b58a532c98d7f470f2b887c2b74a086d5f2e key: 301e0d4b35f8f0c8553b4e93917b8b2685ef2627
- name: install linter - name: install linter
if: steps.cache-cargo.outputs.cache-hit != 'true' if: steps.cache-cargo.outputs.cache-hit != 'true'
run: cargo install --locked --git https://github.com/supabase-community/supa-mdx-lint --rev 3186b58a532c98d7f470f2b887c2b74a086d5f2e run: cargo install --locked --git https://github.com/supabase-community/supa-mdx-lint --rev 301e0d4b35f8f0c8553b4e93917b8b2685ef2627
- name: run linter - name: run linter
env: env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -53,10 +53,10 @@ jobs:
~/.cargo/registry/index/ ~/.cargo/registry/index/
~/.cargo/registry/cache/ ~/.cargo/registry/cache/
~/.cargo/git/db/ ~/.cargo/git/db/
key: 3186b58a532c98d7f470f2b887c2b74a086d5f2e key: 301e0d4b35f8f0c8553b4e93917b8b2685ef2627
- name: install linter - name: install linter
if: steps.filter.outputs.docs == 'true' && steps.cache-cargo.outputs.cache-hit != 'true' if: steps.filter.outputs.docs == 'true' && steps.cache-cargo.outputs.cache-hit != 'true'
run: cargo install --locked --git https://github.com/supabase-community/supa-mdx-lint --rev 3186b58a532c98d7f470f2b887c2b74a086d5f2e run: cargo install --locked --git https://github.com/supabase-community/supa-mdx-lint --rev 301e0d4b35f8f0c8553b4e93917b8b2685ef2627
- name: install reviewdog - name: install reviewdog
if: steps.filter.outputs.docs == 'true' if: steps.filter.outputs.docs == 'true'
uses: reviewdog/action-setup@3f401fe1d58fe77e10d665ab713057375e39b887 # v1.3.0 uses: reviewdog/action-setup@3f401fe1d58fe77e10d665ab713057375e39b887 # v1.3.0

View File

@@ -11,6 +11,6 @@ Your database will be available in less than a minute.
You can find your project credentials on the dashboard: You can find your project credentials on the dashboard:
- [Database connection strings](https://supabase.com/dashboard/project/_/settings/api?showConnect=true): Direct and Pooler connection details including the connection string and parameters. - [Database connection strings](/dashboard/project/_/settings/api?showConnect=true): Direct and Pooler connection details including the connection string and parameters.
- [Database password](https://supabase.com/dashboard/project/_/database/settings): Reset database password here if you do not have it. - [Database password](/dashboard/project/_/database/settings): Reset database password here if you do not have it.
- [API credentials](https://supabase.com/dashboard/project/_/settings/api): your serverless API URL and `anon` / `service_role` keys. - [API credentials](/dashboard/project/_/settings/api): your serverless API URL and `anon` / `service_role` keys.

View File

@@ -2,6 +2,6 @@
- If you're planning to migrate a database larger than 6 GB, we recommend [upgrading to at least a Large compute add-on](/docs/guides/platform/compute-add-ons). This will ensure you have the necessary resources to handle the migration efficiently. - If you're planning to migrate a database larger than 6 GB, we recommend [upgrading to at least a Large compute add-on](/docs/guides/platform/compute-add-ons). This will ensure you have the necessary resources to handle the migration efficiently.
- We strongly advise you to pre-provision the disk space you will need for your migration. On paid projects, you can do this by navigating to the [Compute and Disk Settings](https://supabase.com/dashboard/project/_/settings/compute-and-disk) page. For more information on disk scaling and disk limits, check out our [disk settings](https://supabase.com/docs/guides/platform/compute-and-disk#disk) documentation. - We strongly advise you to pre-provision the disk space you will need for your migration. On paid projects, you can do this by navigating to the [Compute and Disk Settings](/dashboard/project/_/settings/compute-and-disk) page. For more information on disk scaling and disk limits, check out our [disk settings](/docs/guides/platform/compute-and-disk#disk) documentation.
</Admonition> </Admonition>

View File

@@ -4,7 +4,7 @@ Before you start building you need to set up the Database and API. You can do th
### Create a project ### Create a project
1. [Create a new project](https://supabase.com/dashboard) in the Supabase Dashboard. 1. [Create a new project](/dashboard) in the Supabase Dashboard.
2. Enter your project details. 2. Enter your project details.
3. Wait for the new database to launch. 3. Wait for the new database to launch.
@@ -21,7 +21,7 @@ Now set up the database schema. You can use the "User Management Starter" quicks
> >
<TabPanel id="dashboard" label="Dashboard"> <TabPanel id="dashboard" label="Dashboard">
1. Go to the [SQL Editor](https://supabase.com/dashboard/project/_/sql) page in the Dashboard. 1. Go to the [SQL Editor](/dashboard/project/_/sql) page in the Dashboard.
2. Click **User Management Starter** under the **Community > Quickstarts** tab. 2. Click **User Management Starter** under the **Community > Quickstarts** tab.
3. Click **Run**. 3. Click **Run**.
@@ -61,5 +61,5 @@ Now that you've created some database tables, you are ready to insert data using
To do this, you need to get the Project URL and `anon` key from the API settings. To do this, you need to get the Project URL and `anon` key from the API settings.
1. Go to the [API Settings](https://supabase.com/dashboard/project/_/settings/api) page in the Dashboard. 1. Go to the [API Settings](/dashboard/project/_/settings/api) page in the Dashboard.
2. Find your Project `URL`, `anon`, and `service_role` keys on this page. 2. Find your Project `URL`, `anon`, and `service_role` keys on this page.

View File

@@ -24,9 +24,9 @@ curl -X POST https://api.supabase.com/v1/projects \
}' }'
``` ```
When your project is up and running, go to the [Table Editor](https://supabase.com/dashboard/project/_/editor), create a new table and insert some data. When your project is up and running, go to the [Table Editor](/dashboard/project/_/editor), create a new table and insert some data.
Alternatively, you can run the following snippet in your project's [SQL Editor](https://supabase.com/dashboard/project/_/sql/new). This will create a `instruments` table with some sample data. Alternatively, you can run the following snippet in your project's [SQL Editor](/dashboard/project/_/sql/new). This will create a `instruments` table with some sample data.
</StepHikeCompact.Details> </StepHikeCompact.Details>

View File

@@ -1,6 +1,6 @@
- Go to your [Supabase Project Dashboard](https://supabase.com/dashboard) - Go to your [Supabase Project Dashboard](/dashboard)
- In the left sidebar, click the `Authentication` icon (near the top) - In the left sidebar, click the `Authentication` icon (near the top)
- Click on [`Providers`](https://supabase.com/dashboard/project/_/auth/providers) under the Configuration section - Click on [`Providers`](/dashboard/project/_/auth/providers) under the Configuration section
- Click on **{{ .provider }}** from the accordion list to expand and turn **{{ .provider }} Enabled** to ON - Click on **{{ .provider }}** from the accordion list to expand and turn **{{ .provider }} Enabled** to ON
- Enter your **{{ .provider }} Client ID** and **{{ .provider }} Client Secret** saved in the previous step - Enter your **{{ .provider }} Client ID** and **{{ .provider }} Client Secret** saved in the previous step
- Click `Save` - Click `Save`

View File

@@ -1,8 +1,8 @@
The next step requires a callback URL, which looks like this: `https://<project-ref>.supabase.co/auth/v1/callback` The next step requires a callback URL, which looks like this: `https://<project-ref>.supabase.co/auth/v1/callback`
- Go to your [Supabase Project Dashboard](https://supabase.com/dashboard) - Go to your [Supabase Project Dashboard](/dashboard)
- Click on the `Authentication` icon in the left sidebar - Click on the `Authentication` icon in the left sidebar
- Click on [`Providers`](https://supabase.com/dashboard/project/_/auth/providers) under the Configuration section - Click on [`Providers`](/dashboard/project/_/auth/providers) under the Configuration section
- Click on **{{ .provider }}** from the accordion list to expand and you'll find your **Callback URL**, you can click `Copy` to copy it to the clipboard - Click on **{{ .provider }}** from the accordion list to expand and you'll find your **Callback URL**, you can click `Copy` to copy it to the clipboard
<Admonition type="note"> <Admonition type="note">

View File

@@ -54,7 +54,7 @@ poetry install
### Step 3: Create a Supabase project ### Step 3: Create a Supabase project
Create a [Supabase project](https://supabase.com/dashboard) and database by following the instructions [here](https://supabase.com/docs/guides/platform). Export the environment variables required for the retrieval plugin to work: Create a [Supabase project](/dashboard) and database by following the instructions [here](/docs/guides/platform). Export the environment variables required for the retrieval plugin to work:
```bash ```bash
export OPENAI_API_KEY=<open_ai_api_key> export OPENAI_API_KEY=<open_ai_api_key>

View File

@@ -33,7 +33,7 @@ There are 3 steps to build similarity search inside your documentation:
### Prepare your database ### Prepare your database
To prepare, create a [new Supabase project](https://database.new) and store the database and API credentials, which you can find in the project [settings](https://supabase.com/dashboard/project/_/settings). To prepare, create a [new Supabase project](https://database.new) and store the database and API credentials, which you can find in the project [settings](/dashboard/project/_/settings).
Now we can use the [Headless Vector Search](https://github.com/supabase/headless-vector-search#set-up) instructions to set up the database: Now we can use the [Headless Vector Search](https://github.com/supabase/headless-vector-search#set-up) instructions to set up the database:
@@ -42,7 +42,7 @@ Now we can use the [Headless Vector Search](https://github.com/supabase/headless
3. Apply the database migrations: `supabase db push` 3. Apply the database migrations: `supabase db push`
4. Set your OpenAI key as a secret: `supabase secrets set OPENAI_API_KEY=sk-xxx` 4. Set your OpenAI key as a secret: `supabase secrets set OPENAI_API_KEY=sk-xxx`
5. Deploy the Edge Functions: `supabase functions deploy --no-verify-jwt` 5. Deploy the Edge Functions: `supabase functions deploy --no-verify-jwt`
6. Expose `docs` schema via API in Supabase Dashboard [settings](https://supabase.com/dashboard/project/_/settings/api) > `API Settings` > `Exposed schemas` 6. Expose `docs` schema via API in Supabase Dashboard [settings](/dashboard/project/_/settings/api) > `API Settings` > `Exposed schemas`
### Ingest your documentation ### Ingest your documentation
@@ -112,6 +112,6 @@ const onSubmit = (e: Event) => {
## Resources ## Resources
- Read about how we built [ChatGPT for the Supabase Docs](https://supabase.com/blog/chatgpt-supabase-docs). - Read about how we built [ChatGPT for the Supabase Docs](/blog/chatgpt-supabase-docs).
- Read the pgvector Docs for [Embeddings and vector similarity](/docs/guides/database/extensions/pgvector) - Read the pgvector Docs for [Embeddings and vector similarity](/docs/guides/database/extensions/pgvector)
- See how to build something like this from scratch [using Next.js](/docs/guides/ai/examples/nextjs-vector-search). - See how to build something like this from scratch [using Next.js](/docs/guides/ai/examples/nextjs-vector-search).

View File

@@ -6,25 +6,25 @@ video: 'https://www.youtube.com/v/OgnYxRkxEUw'
tocVideo: 'OgnYxRkxEUw' tocVideo: 'OgnYxRkxEUw'
--- ---
We can combine Hugging Face with [Supabase Storage](https://supabase.com/storage) and [Database Webhooks](https://supabase.com/docs/guides/database/webhooks) to automatically caption for any image we upload to a storage bucket. We can combine Hugging Face with [Supabase Storage](/storage) and [Database Webhooks](/docs/guides/database/webhooks) to automatically caption for any image we upload to a storage bucket.
## About Hugging Face ## About Hugging Face
[Hugging Face](https://huggingface.co/) is the collaboration platform for the machine learning community. [Hugging Face](https://huggingface.co/) is the collaboration platform for the machine learning community.
[Huggingface.js](https://huggingface.co/docs/huggingface.js/index) provides a convenient way to make calls to 100,000+ Machine Learning models, making it easy to incorporate AI functionality into your [Supabase Edge Functions](https://supabase.com/edge-functions). [Huggingface.js](https://huggingface.co/docs/huggingface.js/index) provides a convenient way to make calls to 100,000+ Machine Learning models, making it easy to incorporate AI functionality into your [Supabase Edge Functions](/edge-functions).
## Setup ## Setup
- Open your Supabase project dashboard or [create a new project](https://supabase.com/dashboard/projects). - Open your Supabase project dashboard or [create a new project](/dashboard/projects).
- [Create a new bucket](https://supabase.com/dashboard/project/_/storage/buckets) called `images`. - [Create a new bucket](/dashboard/project/_/storage/buckets) called `images`.
- Generate TypeScript types from remote Database. - Generate TypeScript types from remote Database.
- Create a new Database table called `image_caption`. - Create a new Database table called `image_caption`.
- Create `id` column of type `uuid` which references `storage.objects.id`. - Create `id` column of type `uuid` which references `storage.objects.id`.
- Create a `caption` column of type `text`. - Create a `caption` column of type `text`.
- Regenerate TypeScript types to include new `image_caption` table. - Regenerate TypeScript types to include new `image_caption` table.
- Deploy the function to Supabase: `supabase functions deploy huggingface-image-captioning`. - Deploy the function to Supabase: `supabase functions deploy huggingface-image-captioning`.
- Create the Database Webhook in the [Supabase Dashboard](https://supabase.com/dashboard/project/_/database/hooks) to trigger the `huggingface-image-captioning` function anytime a record is added to the `storage.objects` table. - Create the Database Webhook in the [Supabase Dashboard](/dashboard/project/_/database/hooks) to trigger the `huggingface-image-captioning` function anytime a record is added to the `storage.objects` table.
## Generate TypeScript types ## Generate TypeScript types

View File

@@ -30,7 +30,7 @@ poetry new video-search
## Setup Supabase project ## Setup Supabase project
If you haven't already, [install the Supabase CLI](https://supabase.com/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/cli), then initialize Supabase in the root of your newly created poetry project:
```shell ```shell
supabase init supabase init

View File

@@ -12,19 +12,19 @@ While our [Headless Vector search](/docs/guides/ai/examples/headless-vector-sear
2. Store you embeddings in Postgres using pgvector. 2. Store you embeddings in Postgres using pgvector.
3. Deploy a function for answering your users' questions. 3. Deploy a function for answering your users' questions.
You can read our [Supabase Clippy](https://supabase.com/blog/chatgpt-supabase-docs) blog post for a full example. You can read our [Supabase Clippy](/blog/chatgpt-supabase-docs) blog post for a full example.
We assume that you have a Next.js project with a collection of `.mdx` files nested inside your `pages` directory. We will start developing locally with the Supabase CLI and then push our local database changes to our hosted Supabase project. You can find the [full Next.js example on GitHub](https://github.com/supabase-community/nextjs-openai-doc-search). We assume that you have a Next.js project with a collection of `.mdx` files nested inside your `pages` directory. We will start developing locally with the Supabase CLI and then push our local database changes to our hosted Supabase project. You can find the [full Next.js example on GitHub](https://github.com/supabase-community/nextjs-openai-doc-search).
## Create a project ## Create a project
1. [Create a new project](https://supabase.com/dashboard) in the Supabase Dashboard. 1. [Create a new project](/dashboard) in the Supabase Dashboard.
1. Enter your project details. 1. Enter your project details.
1. Wait for the new database to launch. 1. Wait for the new database to launch.
## Prepare the database ## Prepare the database
Let's prepare the database schema. We can use the "OpenAI Vector Search" quickstart in the [SQL Editor](https://supabase.com/dashboard/project/_/sql), or you can copy/paste the SQL below and run it yourself. Let's prepare the database schema. We can use the "OpenAI Vector Search" quickstart in the [SQL Editor](/dashboard/project/_/sql), or you can copy/paste the SQL below and run it yourself.
<Tabs <Tabs
scrollable scrollable
@@ -35,7 +35,7 @@ Let's prepare the database schema. We can use the "OpenAI Vector Search" quickst
> >
<TabPanel id="dashboard" label="Dashboard"> <TabPanel id="dashboard" label="Dashboard">
1. Go to the [SQL Editor](https://supabase.com/dashboard/project/_/sql) page in the Dashboard. 1. Go to the [SQL Editor](/dashboard/project/_/sql) page in the Dashboard.
2. Click **OpenAI Vector Search**. 2. Click **OpenAI Vector Search**.
3. Click **Run**. 3. Click **Run**.
@@ -147,7 +147,7 @@ Let's prepare the database schema. We can use the "OpenAI Vector Search" quickst
Anytime the user sends a query, we want to find the content that's relevant to their questions. We can do this using pgvector's similarity search. Anytime the user sends a query, we want to find the content that's relevant to their questions. We can do this using pgvector's similarity search.
These are quite complex SQL operations, so let's wrap them in database functions that we can call from our frontend using [RPC](https://supabase.com/docs/reference/javascript/rpc). These are quite complex SQL operations, so let's wrap them in database functions that we can call from our frontend using [RPC](/docs/reference/javascript/rpc).
</StepHikeCompact.Details> </StepHikeCompact.Details>
@@ -527,8 +527,8 @@ const handleConfirm = React.useCallback(
Want to learn more about the awesome tech that is powering this? Want to learn more about the awesome tech that is powering this?
- Read about how we built [ChatGPT for the Supabase Docs](https://supabase.com/blog/chatgpt-supabase-docs). - Read about how we built [ChatGPT for the Supabase Docs](/blog/chatgpt-supabase-docs).
- Read the pgvector Docs for [Embeddings and vector similarity](https://supabase.com/docs/guides/database/extensions/pgvector) - Read the pgvector Docs for [Embeddings and vector similarity](/docs/guides/database/extensions/pgvector)
- Watch Greg's video for a full breakdown: - Watch Greg's video for a full breakdown:
<div class="video-container"> <div class="video-container">

View File

@@ -34,7 +34,7 @@ If you haven't already, head over to [database.new](https://database.new) and cr
When creating your project, make sure to note down your database password as you will need it to construct the `DB_URL` in the next step. When creating your project, make sure to note down your database password as you will need it to construct the `DB_URL` in the next step.
You can find your database connection string on your project dashboard, click [Connect](https://supabase.com/dashboard/project/_?showConnect=true). Use the Session pooler connection string which looks like this: You can find your database connection string on your project dashboard, click [Connect](/dashboard/project/_?showConnect=true). Use the Session pooler connection string which looks like this:
```txt ```txt
postgresql://postgres.[PROJECT-REF]:[YOUR-PASSWORD]@aws-0-[REGION].pooler.supabase.com:5432/postgres postgresql://postgres.[PROJECT-REF]:[YOUR-PASSWORD]@aws-0-[REGION].pooler.supabase.com:5432/postgres
@@ -188,7 +188,7 @@ seed = "image_search.main:seed"
search = "image_search.main:search" search = "image_search.main:search"
``` ```
After activating the virtual environment with `poetry shell` you can now run your seed script via `poetry run seed`. You can inspect the generated embeddings in your Supabase Dashboard by visiting the [Table Editor](https://supabase.com/dashboard/project/_/editor), selecting the `vecs` schema, and the `image_vectors` table. After activating the virtual environment with `poetry shell` you can now run your seed script via `poetry run seed`. You can inspect the generated embeddings in your Supabase Dashboard by visiting the [Table Editor](/dashboard/project/_/editor), selecting the `vecs` schema, and the `image_vectors` table.
## Perform an image search from a text query ## Perform an image search from a text query

View File

@@ -26,7 +26,7 @@ On the other hand, if you need to scale your application, you will need to [crea
## HNSW vs IVFFlat indexes ## HNSW vs IVFFlat indexes
`pgvector` supports two types of indexes: HNSW and IVFFlat. We recommend using [HNSW](/docs/guides/ai/vector-indexes/hnsw-indexes) because of its [performance](https://supabase.com/blog/increase-performance-pgvector-hnsw#hnsw-performance-1536-dimensions) and [robustness against changing data](/docs/guides/ai/vector-indexes/hnsw-indexes#when-should-you-create-hnsw-indexes). `pgvector` supports two types of indexes: HNSW and IVFFlat. We recommend using [HNSW](/docs/guides/ai/vector-indexes/hnsw-indexes) because of its [performance](/blog/increase-performance-pgvector-hnsw#hnsw-performance-1536-dimensions) and [robustness against changing data](/docs/guides/ai/vector-indexes/hnsw-indexes#when-should-you-create-hnsw-indexes).
<Image <Image
alt="dbpedia embeddings comparing ivfflat and hnsw queries-per-second using the 4XL compute add-on" alt="dbpedia embeddings comparing ivfflat and hnsw queries-per-second using the 4XL compute add-on"
@@ -68,7 +68,7 @@ The values of lists and probes directly affect accuracy and queries per second (
- Higher `probes` means that select queries will be slower, but you can achieve better accuracy. - Higher `probes` means that select queries will be slower, but you can achieve better accuracy.
- `lists` and `probes` are not independent. Higher `lists` means that you will have to use higher `probes` to achieve the same accuracy. - `lists` and `probes` are not independent. Higher `lists` means that you will have to use higher `probes` to achieve the same accuracy.
You can find more examples of how `lists` and `probes` constants affect accuracy and QPS in [pgvector 0.4.0 performance](https://supabase.com/blog/pgvector-performance) blogpost. You can find more examples of how `lists` and `probes` constants affect accuracy and QPS in [pgvector 0.4.0 performance](/blog/pgvector-performance) blogpost.
<Image <Image
alt="multi database" alt="multi database"
@@ -109,7 +109,7 @@ Don't forget to check out the general [Production Checklist](/docs/guides/platfo
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. 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.
Or take a look at our [pgvector 0.5.0 performance](https://supabase.com/blog/increase-performance-pgvector-hnsw) and [pgvector 0.4.0 performance](https://supabase.com/blog/pgvector-performance) blog posts to see what pgvector is capable of and how the above technique can be used to achieve the best results. Or take a look at our [pgvector 0.5.0 performance](/blog/increase-performance-pgvector-hnsw) and [pgvector 0.4.0 performance](/blog/pgvector-performance) blog posts to see what pgvector is capable of and how the above technique can be used to achieve the best results.
<Image <Image
alt="multi database" alt="multi database"

View File

@@ -15,7 +15,7 @@ sidebar_label: 'Google Colab'
Google Colab is a hosted Jupyter Notebook service. It provides free access to computing resources, including GPUs and TPUs, and is well-suited to machine learning, data science, and education. We can use Colab to manage collections using [Supabase Vecs](/docs/guides/ai/vecs-python-client). Google Colab is a hosted Jupyter Notebook service. It provides free access to computing resources, including GPUs and TPUs, and is well-suited to machine learning, data science, and education. We can use Colab to manage collections using [Supabase Vecs](/docs/guides/ai/vecs-python-client).
In this tutorial we'll connect to a database running on the Supabase [platform](https://supabase.com/dashboard/). If you don't already have a database, you can create one here: [database.new](https://database.new). In this tutorial we'll connect to a database running on the Supabase [platform](/dashboard/). If you don't already have a database, you can create one here: [database.new](https://database.new).
## Create a new notebook ## Create a new notebook
@@ -37,7 +37,7 @@ pip install vecs
## Connect to your database ## Connect to your database
On your project dashboard, click [Connect](https://supabase.com/dashboard/project/_?showConnect=true). The connection string should look like `postgres://postgres.xxxx:password@xxxx.pooler.supabase.com:6543/postgres` On your project dashboard, click [Connect](/dashboard/project/_?showConnect=true). The connection string should look like `postgres://postgres.xxxx:password@xxxx.pooler.supabase.com:6543/postgres`
Create a new code block below the install block (`ctrl+m b`) and add the following code using the Postgres URI you copied above: Create a new code block below the install block (`ctrl+m b`) and add the following code using the Postgres URI you copied above:
@@ -77,7 +77,7 @@ collection.upsert(
) )
``` ```
This will create a table inside your database within the `vecs` schema, called `colab_collection`. You can view the inserted items in the [Table Editor](https://supabase.com/dashboard/project/_/editor/), by selecting the `vecs` schema from the schema dropdown. This will create a table inside your database within the `vecs` schema, called `colab_collection`. You can view the inserted items in the [Table Editor](/dashboard/project/_/editor/), by selecting the `vecs` schema from the schema dropdown.
![Colab documents](/docs/img/ai/google-colab/colab-documents.png) ![Colab documents](/docs/img/ai/google-colab/colab-documents.png)

View File

@@ -42,7 +42,7 @@ DB_CONNECTION = "postgresql://<user>:<password>@<host>:<port>/<db_name>"
vx = vecs.create_client(DB_CONNECTION) vx = vecs.create_client(DB_CONNECTION)
``` ```
Replace the `DB_CONNECTION` with your own connection string. You can find the connection string on your project dashboard by clicking [Connect](https://supabase.com/dashboard/project/_?showConnect=true). Replace the `DB_CONNECTION` with your own connection string. You can find the connection string on your project dashboard by clicking [Connect](/dashboard/project/_?showConnect=true).
<Admonition type='note'> <Admonition type='note'>
@@ -60,7 +60,7 @@ You must use the "connection pooling" string (domain ending in `*.pooler.supabas
Now all that's left is to step through the notebook. You can do this by clicking the "execute" button (`ctrl+enter`) at the top left of each code cell. The notebook guides you through the process of creating a collection, adding data to it, and querying it. Now all that's left is to step through the notebook. You can do this by clicking the "execute" button (`ctrl+enter`) at the top left of each code cell. The notebook guides you through the process of creating a collection, adding data to it, and querying it.
You can view the inserted items in the [Table Editor](https://supabase.com/dashboard/project/_/editor/), by selecting the `vecs` schema from the schema dropdown. You can view the inserted items in the [Table Editor](/dashboard/project/_/editor/), by selecting the `vecs` schema from the schema dropdown.
![Colab documents](/docs/img/ai/google-colab/colab-documents.png) ![Colab documents](/docs/img/ai/google-colab/colab-documents.png)

View File

@@ -20,7 +20,7 @@ Prepare you database with the relevant tables:
> >
<TabPanel id="dashboard" label="Dashboard"> <TabPanel id="dashboard" label="Dashboard">
1. Go to the [SQL Editor](https://supabase.com/dashboard/project/_/sql) page in the Dashboard. 1. Go to the [SQL Editor](/dashboard/project/_/sql) page in the Dashboard.
2. Click **LangChain** in the Quick start section. 2. Click **LangChain** in the Quick start section.
3. Click **Run**. 3. Click **Run**.
@@ -147,7 +147,7 @@ export const run = async () => {
### Advanced metadata filtering ### Advanced metadata filtering
You can also use query builder-style filtering ([similar to how the Supabase JavaScript library works](https://supabase.com/docs/reference/javascript/using-filters)) instead of passing an object. Note that since the filter properties will be in the metadata column, you need to use arrow operators (`->` for integer or `->>` for text) as defined in [PostgREST API documentation](https://postgrest.org/en/stable/references/api/tables_views.html?highlight=operators#json-columns) and specify the data type of the property (e.g. the column should look something like `metadata->some_int_value::int`). You can also use query builder-style filtering ([similar to how the Supabase JavaScript library works](/docs/reference/javascript/using-filters)) instead of passing an object. Note that since the filter properties will be in the metadata column, you need to use arrow operators (`->` for integer or `->>` for text) as defined in [PostgREST API documentation](https://postgrest.org/en/stable/references/api/tables_views.html?highlight=operators#json-columns) and specify the data type of the property (e.g. the column should look something like `metadata->some_int_value::int`).
```js ```js
import { SupabaseFilterRPCCall, SupabaseVectorStore } from 'langchain/vectorstores/supabase' import { SupabaseFilterRPCCall, SupabaseVectorStore } from 'langchain/vectorstores/supabase'

View File

@@ -11,7 +11,7 @@ For data science or ephemeral workloads, the [Supabase Vecs](https://supabase.gi
<Admonition type="tip"> <Admonition type="tip">
Click [**Connect**](https://supabase.com/dashboard/project/_/?showConnect=true) at the top of any project page to get your connection string. Click [**Connect**](/dashboard/project/_/?showConnect=true) at the top of any project page to get your connection string.
Copy the URI from the **Shared pooler** option. Copy the URI from the **Shared pooler** option.

View File

@@ -40,7 +40,7 @@ DB_CONNECTION = "postgresql://<user>:<password>@<host>:<port>/<db_name>"
vx = vecs.create_client(DB_CONNECTION) vx = vecs.create_client(DB_CONNECTION)
``` ```
Replace the `DB_CONNECTION` with your own connection string. You can find the connection string on your project dashboard by clicking [Connect](https://supabase.com/dashboard/project/_?showConnect=true). Replace the `DB_CONNECTION` with your own connection string. You can find the connection string on your project dashboard by clicking [Connect](/dashboard/project/_?showConnect=true).
<Admonition type='note'> <Admonition type='note'>
@@ -58,7 +58,7 @@ You must use the "connection pooling" string (domain ending in `*.pooler.supabas
Now all that's left is to step through the notebook. You can do this by clicking the "execute" button (`ctrl+enter`) at the top left of each code cell. The notebook guides you through the process of creating a collection, adding data to it, and querying it. Now all that's left is to step through the notebook. You can do this by clicking the "execute" button (`ctrl+enter`) at the top left of each code cell. The notebook guides you through the process of creating a collection, adding data to it, and querying it.
You can view the inserted items in the [Table Editor](https://supabase.com/dashboard/project/_/editor/), by selecting the `vecs` schema from the schema dropdown. You can view the inserted items in the [Table Editor](/dashboard/project/_/editor/), by selecting the `vecs` schema from the schema dropdown.
![Colab documents](/docs/img/ai/google-colab/colab-documents.png) ![Colab documents](/docs/img/ai/google-colab/colab-documents.png)

View File

@@ -41,7 +41,7 @@ DB_CONNECTION = "postgresql://<user>:<password>@<host>:<port>/<db_name>"
vx = vecs.create_client(DB_CONNECTION) vx = vecs.create_client(DB_CONNECTION)
``` ```
Replace the `DB_CONNECTION` with your Session pooler connection string. You can find the connection string on your project dashboard by clicking [Connect](https://supabase.com/dashboard/project/_?showConnect=true). Replace the `DB_CONNECTION` with your Session pooler connection string. You can find the connection string on your project dashboard by clicking [Connect](/dashboard/project/_?showConnect=true).
<Admonition type='note'> <Admonition type='note'>
@@ -59,7 +59,7 @@ You must use the Session pooler connection string with Google Colab since Colab
Now all that's left is to step through the notebook. You can do this by clicking the "execute" button (`ctrl+enter`) at the top left of each code cell. The notebook guides you through the process of creating a collection, adding data to it, and querying it. Now all that's left is to step through the notebook. You can do this by clicking the "execute" button (`ctrl+enter`) at the top left of each code cell. The notebook guides you through the process of creating a collection, adding data to it, and querying it.
You can view the inserted items in the [Table Editor](https://supabase.com/dashboard/project/_/editor/), by selecting the `vecs` schema from the schema dropdown. You can view the inserted items in the [Table Editor](/dashboard/project/_/editor/), by selecting the `vecs` schema from the schema dropdown.
![Colab documents](/docs/img/ai/google-colab/colab-documents.png) ![Colab documents](/docs/img/ai/google-colab/colab-documents.png)

View File

@@ -41,7 +41,7 @@ DB_CONNECTION = "postgresql://<user>:<password>@<host>:<port>/<db_name>"
vx = vecs.create_client(DB_CONNECTION) vx = vecs.create_client(DB_CONNECTION)
``` ```
Replace the `DB_CONNECTION` with your own connection string. You can find the connection string on your project dashboard by clicking [Connect](https://supabase.com/dashboard/project/_?showConnect=true). Replace the `DB_CONNECTION` with your own connection string. You can find the connection string on your project dashboard by clicking [Connect](/dashboard/project/_?showConnect=true).
<Admonition type='note'> <Admonition type='note'>
@@ -59,7 +59,7 @@ You must use the "connection pooling" string (domain ending in `*.pooler.supabas
Now all that's left is to step through the notebook. You can do this by clicking the "execute" button (`ctrl+enter`) at the top left of each code cell. The notebook guides you through the process of creating a collection, adding data to it, and querying it. Now all that's left is to step through the notebook. You can do this by clicking the "execute" button (`ctrl+enter`) at the top left of each code cell. The notebook guides you through the process of creating a collection, adding data to it, and querying it.
You can view the inserted items in the [Table Editor](https://supabase.com/dashboard/project/_/editor/), by selecting the `vecs` schema from the schema dropdown. You can view the inserted items in the [Table Editor](/dashboard/project/_/editor/), by selecting the `vecs` schema from the schema dropdown.
![Colab documents](/docs/img/ai/google-colab/colab-documents.png) ![Colab documents](/docs/img/ai/google-colab/colab-documents.png)

View File

@@ -113,13 +113,13 @@ You may have an existing system that stores users, documents, and their permissi
<Admonition type="caution"> <Admonition type="caution">
RLS is latency-sensitive, so extra caution should be taken before implementing this method. Use the [query plan analyzer](https://supabase.com/docs/guides/platform/performance#optimizing-poor-performing-queries) to measure execution times for your queries to ensure they are within expected ranges. For enterprise applications, contact enterprise@supabase.io. RLS is latency-sensitive, so extra caution should be taken before implementing this method. Use the [query plan analyzer](/docs/guides/platform/performance#optimizing-poor-performing-queries) to measure execution times for your queries to ensure they are within expected ranges. For enterprise applications, contact enterprise@supabase.io.
</Admonition> </Admonition>
<Admonition type="tip"> <Admonition type="tip">
For data sources other than Postgres, see [Foreign Data Wrappers](/docs/guides/database/extensions/wrappers/overview) for a list of external sources supported today. If your data lives in a source not provided in the list, contact [support](https://supabase.com/dashboard/support/new) and we'll be happy to discuss your use case. For data sources other than Postgres, see [Foreign Data Wrappers](/docs/guides/database/extensions/wrappers/overview) for a list of external sources supported today. If your data lives in a source not provided in the list, contact [support](/dashboard/support/new) and we'll be happy to discuss your use case.
</Admonition> </Admonition>
@@ -189,7 +189,7 @@ Since we're managing users and authentication outside of Supabase, we have two o
#### Direct Postgres connection #### Direct Postgres connection
You can directly connect to your Supabase Postgres DB using the [connection info](https://supabase.com/dashboard/project/_/?showConnect=true) on a project page. To use RLS with this method, we use a custom session variable that contains the current user's ID: You can directly connect to your Supabase Postgres DB using the [connection info](/dashboard/project/_/?showConnect=true) on a project page. To use RLS with this method, we use a custom session variable that contains the current user's ID:
```sql ```sql
-- enable row level security -- enable row level security
@@ -271,4 +271,4 @@ order by document_sections.embedding <#> embedding;
There are endless approaches to this problem based on the complexities of each system. Luckily Postgres comes with all the primitives needed to provide access control in the way that works best for your project. There are endless approaches to this problem based on the complexities of each system. Luckily Postgres comes with all the primitives needed to provide access control in the way that works best for your project.
If the examples above didn't fit your use case or you need to adjust them slightly to better fit your existing system, feel free to reach out to [support](https://supabase.com/dashboard/support/new) and we'll be happy to assist you. If the examples above didn't fit your use case or you need to adjust them slightly to better fit your existing system, feel free to reach out to [support](/dashboard/support/new) and we'll be happy to assist you.

View File

@@ -22,7 +22,7 @@ Vectors in Supabase are enabled via [pgvector](https://github.com/pgvector/pgvec
> >
<TabPanel id="dashboard" label="Dashboard"> <TabPanel id="dashboard" label="Dashboard">
1. Go to the [Database](https://supabase.com/dashboard/project/_/database/tables) page in the Dashboard. 1. Go to the [Database](/dashboard/project/_/database/tables) page in the Dashboard.
2. Click on **Extensions** in the sidebar. 2. Click on **Extensions** in the sidebar.
3. Search for "vector" and enable the extension. 3. Search for "vector" and enable the extension.
@@ -63,7 +63,7 @@ In the above SQL snippet, we create a `documents` table with a column called `em
<Admonition type="tip"> <Admonition type="tip">
In general, embeddings with fewer dimensions perform best. See our [analysis on fewer dimensions in pgvector](https://supabase.com/blog/fewer-dimensions-are-better-pgvector). In general, embeddings with fewer dimensions perform best. See our [analysis on fewer dimensions in pgvector](/blog/fewer-dimensions-are-better-pgvector).
</Admonition> </Admonition>

View File

@@ -14,7 +14,7 @@ Today `pgvector` supports two types of indexes:
- [HNSW](/docs/guides/ai/vector-indexes/hnsw-indexes) - [HNSW](/docs/guides/ai/vector-indexes/hnsw-indexes)
- [IVFFlat](/docs/guides/ai/vector-indexes/ivf-indexes) - [IVFFlat](/docs/guides/ai/vector-indexes/ivf-indexes)
In general we recommend using [HNSW](/docs/guides/ai/vector-indexes/hnsw-indexes) because of its [performance](https://supabase.com/blog/increase-performance-pgvector-hnsw#hnsw-performance-1536-dimensions) and [robustness against changing data](/docs/guides/ai/vector-indexes/hnsw-indexes#when-should-you-create-hnsw-indexes). In general we recommend using [HNSW](/docs/guides/ai/vector-indexes/hnsw-indexes) because of its [performance](/blog/increase-performance-pgvector-hnsw#hnsw-performance-1536-dimensions) and [robustness against changing data](/docs/guides/ai/vector-indexes/hnsw-indexes#when-should-you-create-hnsw-indexes).
## Distance operators ## Distance operators

View File

@@ -14,7 +14,7 @@ Today `pgvector` supports two types of indexes:
- [HNSW](/docs/guides/ai/vector-indexes/hnsw-indexes) - [HNSW](/docs/guides/ai/vector-indexes/hnsw-indexes)
- [IVFFlat](/docs/guides/ai/vector-indexes/ivf-indexes) - [IVFFlat](/docs/guides/ai/vector-indexes/ivf-indexes)
In general we recommend using [HNSW](/docs/guides/ai/vector-indexes/hnsw-indexes) because of its [performance](https://supabase.com/blog/increase-performance-pgvector-hnsw#hnsw-performance-1536-dimensions) and [robustness against changing data](/docs/guides/ai/vector-indexes/hnsw-indexes#when-should-you-create-hnsw-indexes). If you have a special use case that requires IVFFlat instead, keep reading. In general we recommend using [HNSW](/docs/guides/ai/vector-indexes/hnsw-indexes) because of its [performance](/blog/increase-performance-pgvector-hnsw#hnsw-performance-1536-dimensions) and [robustness against changing data](/docs/guides/ai/vector-indexes/hnsw-indexes#when-should-you-create-hnsw-indexes). If you have a special use case that requires IVFFlat instead, keep reading.
## Usage ## Usage

View File

@@ -43,4 +43,4 @@ Reference:
## API URL and keys ## API URL and keys
You can find the API URL and Keys in the [Dashboard](https://supabase.com/dashboard/project/_/settings/api-keys). You can find the API URL and Keys in the [Dashboard](/dashboard/project/_/settings/api-keys).

View File

@@ -20,7 +20,7 @@ This creates a corresponding route `todos` which can accept `GET`, `POST`, `PATC
> >
<TabPanel id="dashboard" label="Dashboard"> <TabPanel id="dashboard" label="Dashboard">
1. Go to the [Table editor](https://supabase.com/dashboard/project/_/editor) page in the Dashboard. 1. Go to the [Table editor](/dashboard/project/_/editor) page in the Dashboard.
1. Click **New Table** and create a table with the name `todos`. 1. Click **New Table** and create a table with the name `todos`.
1. Click **Save**. 1. Click **Save**.
1. Click **New Column** and create a column with the name `task` and type `text`. 1. Click **New Column** and create a column with the name `task` and type `text`.
@@ -52,7 +52,7 @@ create table
Every Supabase project has a unique API URL. Your API is secured behind an API gateway which requires an API Key for every request. Every Supabase project has a unique API URL. Your API is secured behind an API gateway which requires an API Key for every request.
1. Go to the [Settings](https://supabase.com/dashboard/project/_/settings/general) page in the Dashboard. 1. Go to the [Settings](/dashboard/project/_/settings/general) page in the Dashboard.
2. Click **API** in the sidebar. 2. Click **API** in the sidebar.
3. Find your API `URL`, `anon`, and `service_role` keys on this page. 3. Find your API `URL`, `anon`, and `service_role` keys on this page.

View File

@@ -14,9 +14,9 @@ We'll create a database table called `todos` for storing tasks. This creates a c
<StepHikeCompact.Step step={1}> <StepHikeCompact.Step step={1}>
<StepHikeCompact.Details title="Set up a Supabase project with a 'todos' table"> <StepHikeCompact.Details title="Set up a Supabase project with a 'todos' table">
[Create a new project](https://supabase.com/dashboard) in the Supabase Dashboard. [Create a new project](/dashboard) in the Supabase Dashboard.
After your project is ready, create a table in your Supabase database. You can do this with either the Table interface or the [SQL Editor](https://supabase.com/dashboard/project/_/sql). After your project is ready, create a table in your Supabase database. You can do this with either the Table interface or the [SQL Editor](/dashboard/project/_/sql).
</StepHikeCompact.Details> </StepHikeCompact.Details>
@@ -109,7 +109,7 @@ We'll create a database table called `todos` for storing tasks. This creates a c
<StepHikeCompact.Step step={4}> <StepHikeCompact.Step step={4}>
<StepHikeCompact.Details title="Fetch the data"> <StepHikeCompact.Details title="Fetch the data">
Find your API URL and Keys in your Dashboard [API Settings](https://supabase.com/dashboard/project/_/settings/api). You can now query your "todos" table by appending `/rest/v1/todos` to the API URL. Find your API URL and Keys in your Dashboard [API Settings](/dashboard/project/_/settings/api). You can now query your "todos" table by appending `/rest/v1/todos` to the API URL.
Copy this block of code, substitute `<PROJECT_REF>` and `<ANON_KEY>`, then run it from a terminal. Copy this block of code, substitute `<PROJECT_REF>` and `<ANON_KEY>`, then run it from a terminal.

View File

@@ -4,9 +4,9 @@ title: 'Auto-generated documentation'
description: 'Supabase provides documentation that updates automatically.' description: 'Supabase provides documentation that updates automatically.'
--- ---
Supabase generates documentation in the [Dashboard](https://supabase.com/dashboard) which updates as you make database changes. Supabase generates documentation in the [Dashboard](/dashboard) which updates as you make database changes.
1. Go to the [API](https://supabase.com/dashboard/project/_/api) page in the Dashboard. 1. Go to the [API](/dashboard/project/_/api) page in the Dashboard.
2. Select any table under **Tables and Views** in the sidebar. 2. Select any table under **Tables and Views** in the sidebar.
3. Switch between the JavaScript and the cURL docs using the tabs. 3. Switch between the JavaScript and the cURL docs using the tabs.

View File

@@ -9,19 +9,19 @@ Supabase provides client libraries for the REST and Realtime APIs. Some librarie
## Official libraries ## Official libraries
| `Language` | `Source Code` | `Documentation` | | `Language` | `Source Code` | `Documentation` |
| --------------------- | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | | --------------------- | ---------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
| Javascript/Typescript | [supabase-js](https://github.com/supabase/supabase-js) | [Docs](https://supabase.com/docs/reference/javascript/introduction) | | Javascript/Typescript | [supabase-js](https://github.com/supabase/supabase-js) | [Docs](/docs/reference/javascript/introduction) |
| Dart/Flutter | [supabase-flutter](https://github.com/supabase/supabase-flutter/tree/main/packages/supabase_flutter) | [Docs](https://supabase.com/docs/reference/dart/introduction) | | Dart/Flutter | [supabase-flutter](https://github.com/supabase/supabase-flutter/tree/main/packages/supabase_flutter) | [Docs](/docs/reference/dart/introduction) |
| Swift | [supabase-swift](https://github.com/supabase/supabase-swift) | [Docs](https://supabase.com/docs/reference/swift/introduction) | | Swift | [supabase-swift](https://github.com/supabase/supabase-swift) | [Docs](/docs/reference/swift/introduction) |
| Python | [supabase-py](https://github.com/supabase/supabase-py) | [Docs](https://supabase.com/docs/reference/python/initializing) | | Python | [supabase-py](https://github.com/supabase/supabase-py) | [Docs](/docs/reference/python/initializing) |
## Community libraries ## Community libraries
| `Language` | `Source Code` | `Documentation` | | `Language` | `Source Code` | `Documentation` |
| ----------------------- | -------------------------------------------------------------------------------- | --------------------------------------------------------------- | | ----------------------- | -------------------------------------------------------------------------------- | ------------------------------------------- |
| C# | [supabase-csharp](https://github.com/supabase-community/supabase-csharp) | [Docs](https://supabase.com/docs/reference/csharp/introduction) | | C# | [supabase-csharp](https://github.com/supabase-community/supabase-csharp) | [Docs](/docs/reference/csharp/introduction) |
| Go | [supabase-go](https://github.com/supabase-community/supabase-go) | | | Go | [supabase-go](https://github.com/supabase-community/supabase-go) | |
| Kotlin | [supabase-kt](https://github.com/supabase-community/supabase-kt) | [Docs](https://supabase.com/docs/reference/kotlin/introduction) | | Kotlin | [supabase-kt](https://github.com/supabase-community/supabase-kt) | [Docs](/docs/reference/kotlin/introduction) |
| Ruby | [supabase-rb](https://github.com/supabase-community/supabase-rb) | | | Ruby | [supabase-rb](https://github.com/supabase-community/supabase-rb) | |
| Godot Engine (GDScript) | [supabase-gdscript](https://github.com/supabase-community/godot-engine.supabase) | | | Godot Engine (GDScript) | [supabase-gdscript](https://github.com/supabase-community/godot-engine.supabase) | |

View File

@@ -10,7 +10,7 @@ Supabase APIs are generated from your database, which means that we can use data
## Generating types from project dashboard ## Generating types from project dashboard
Supabase allows you to generate and download TypeScript types directly from the [project dashboard](https://supabase.com/dashboard/project/_/api?page=tables-intro). Supabase allows you to generate and download TypeScript types directly from the [project dashboard](/dashboard/project/_/api?page=tables-intro).
## Generating types using Supabase CLI ## Generating types using Supabase CLI

View File

@@ -18,7 +18,7 @@ CREATE SCHEMA myschema;
You can expose custom database schemas - to do so you need to follow these steps: You can expose custom database schemas - to do so you need to follow these steps:
1. Go to [API settings](https://supabase.com/dashboard/project/_/settings/api) and add your custom schema to "Exposed schemas". 1. Go to [API settings](/dashboard/project/_/settings/api) and add your custom schema to "Exposed schemas".
2. Run the following SQL, substituting `myschema` with your schema name: 2. Run the following SQL, substituting `myschema` with your schema name:
```sql ```sql

View File

@@ -41,7 +41,7 @@ In the Settings page, look for the **Sitekey** section and copy the key.
## Enable CAPTCHA protection for your Supabase project ## Enable CAPTCHA protection for your Supabase project
Navigate to the **[Auth](https://supabase.com/dashboard/project/_/settings/auth)** section of your Project Settings in the Supabase Dashboard and find the **Enable CAPTCHA protection** toggle under Settings > Authentication > Bot and Abuse Protection > Enable CAPTCHA protection. Navigate to the **[Auth](/dashboard/project/_/settings/auth)** section of your Project Settings in the Supabase Dashboard and find the **Enable CAPTCHA protection** toggle under Settings > Authentication > Bot and Abuse Protection > Enable CAPTCHA protection.
Select your CAPTCHA provider from the dropdown, enter your CAPTCHA **Secret key**, and click **Save**. Select your CAPTCHA provider from the dropdown, enter your CAPTCHA **Secret key**, and click **Save**.

View File

@@ -9,7 +9,7 @@ sitemapPriority: 0.5
As of 7th Feb 2024, [this repository](https://github.com/supabase-community/auth-ui) is no longer maintained by the Supabase Team. At the moment, the team does not have capacity to give the expected level of care to this repository. We may revisit Auth UI in the future but regrettably have to leave it on hold for now as we focus on other priorities such as improving the Server-Side Rendering (SSR) package and advanced Auth primitives. As of 7th Feb 2024, [this repository](https://github.com/supabase-community/auth-ui) is no longer maintained by the Supabase Team. At the moment, the team does not have capacity to give the expected level of care to this repository. We may revisit Auth UI in the future but regrettably have to leave it on hold for now as we focus on other priorities such as improving the Server-Side Rendering (SSR) package and advanced Auth primitives.
As an alternative you can use the [Supabase UI Library](https://supabase.com/ui) which has auth ready blocks to use in your projects. As an alternative you can use the [Supabase UI Library](/ui) which has auth ready blocks to use in your projects.
</Admonition> </Admonition>

View File

@@ -53,7 +53,7 @@ npm install @supabase/auth-helpers-react
## Set up environment variables ## Set up environment variables
Retrieve your project URL and anon key in your project's [API settings](https://supabase.com/dashboard/project/_/settings/api) in the Dashboard to set up the following environment variables. For local development you can set them in a `.env.local` file. See an [example](https://github.com/supabase/auth-helpers/blob/main/examples/nextjs/.env.local.example). Retrieve your project URL and anon key in your project's [API settings](/dashboard/project/_/settings/api) in the Dashboard to set up the following environment variables. For local development you can set them in a `.env.local` file. See an [example](https://github.com/supabase/auth-helpers/blob/main/examples/nextjs/.env.local.example).
```bash .env.local ```bash .env.local
NEXT_PUBLIC_SUPABASE_URL=your-supabase-url NEXT_PUBLIC_SUPABASE_URL=your-supabase-url
@@ -132,7 +132,7 @@ You can now determine if a user is authenticated by checking that the `user` obj
### Code Exchange API route ### Code Exchange API route
The `Code Exchange` API route is required for the [server-side auth flow](https://supabase.com/docs/guides/auth/server-side-rendering) implemented by the Next.js Auth Helpers. It exchanges an auth `code` for the user's `session`, which is set as a cookie for future requests made to Supabase. The `Code Exchange` API route is required for the [server-side auth flow](/docs/guides/auth/server-side-rendering) implemented by the Next.js Auth Helpers. It exchanges an auth `code` for the user's `session`, which is set as a cookie for future requests made to Supabase.
<Tabs <Tabs
scrollable scrollable

View File

@@ -51,7 +51,7 @@ npm install @supabase/auth-helpers-nextjs @supabase/supabase-js
## Declare environment variables ## Declare environment variables
Retrieve your project's URL and anon key from your [API settings](https://supabase.com/dashboard/project/_/settings/api), and create a `.env.local` file with the following environment variables: Retrieve your project's URL and anon key from your [API settings](/dashboard/project/_/settings/api), and create a `.env.local` file with the following environment variables:
```bash .env.local ```bash .env.local
NEXT_PUBLIC_SUPABASE_URL=your-supabase-url NEXT_PUBLIC_SUPABASE_URL=your-supabase-url

View File

@@ -55,7 +55,7 @@ This library supports the following tooling versions:
## Set up environment variables ## Set up environment variables
Retrieve your project URL and anon key in your project's [API settings](https://supabase.com/dashboard/project/_/settings/api) in the Dashboard to set up the following environment variables. For local development you can set them in a `.env` file. See an [example](https://github.com/supabase/auth-helpers/blob/main/examples/remix/.env.example). Retrieve your project URL and anon key in your project's [API settings](/dashboard/project/_/settings/api) in the Dashboard to set up the following environment variables. For local development you can set them in a `.env` file. See an [example](https://github.com/supabase/auth-helpers/blob/main/examples/remix/.env.example).
```bash .env ```bash .env
SUPABASE_URL=YOUR_SUPABASE_URL SUPABASE_URL=YOUR_SUPABASE_URL
@@ -64,7 +64,7 @@ SUPABASE_PUBLISHABLE_KEY=YOUR_SUPABASE_PUBLISHABLE_KEY
### Code Exchange route ### Code Exchange route
The `Code Exchange` route is required for the [server-side auth flow](https://supabase.com/docs/guides/auth/server-side-rendering) implemented by the Remix Auth Helpers. It exchanges an auth `code` for the user's `session`, which is set as a cookie for future requests made to Supabase. The `Code Exchange` route is required for the [server-side auth flow](/docs/guides/auth/server-side-rendering) implemented by the Remix Auth Helpers. It exchanges an auth `code` for the user's `session`, which is set as a cookie for future requests made to Supabase.
<Tabs <Tabs
scrollable scrollable
@@ -822,7 +822,7 @@ export default function Index() {
<Admonition type="tip"> <Admonition type="tip">
Ensure you have [enabled replication](https://supabase.com/dashboard/project/_/database/publications) on the table you are subscribing to. Ensure you have [enabled replication](/dashboard/project/_/database/publications) on the table you are subscribing to.
</Admonition> </Admonition>

View File

@@ -40,7 +40,7 @@ npm install @supabase/auth-helpers-sveltekit @supabase/supabase-js
### Declare environment variables ### Declare environment variables
Retrieve your project's URL and anon key from your [API settings](https://supabase.com/dashboard/project/_/settings/api), and create a `.env.local` file with the following environment variables: Retrieve your project's URL and anon key from your [API settings](/dashboard/project/_/settings/api), and create a `.env.local` file with the following environment variables:
```bash .env.local ```bash .env.local
# Find these in your Supabase project settings https://supabase.com/dashboard/project/_/settings/api # Find these in your Supabase project settings https://supabase.com/dashboard/project/_/settings/api
@@ -161,7 +161,7 @@ Note that we are specifying `filterSerializedResponseHeaders` here. We need to t
### Code Exchange route ### Code Exchange route
The `Code Exchange` route is required for the [server-side auth flow](https://supabase.com/docs/guides/auth/server-side-rendering) implemented by the SvelteKit Auth Helpers. It exchanges an auth `code` for the user's `session`, which is set as a cookie for future requests made to Supabase. The `Code Exchange` route is required for the [server-side auth flow](/docs/guides/auth/server-side-rendering) implemented by the SvelteKit Auth Helpers. It exchanges an auth `code` for the user's `session`, which is set as a cookie for future requests made to Supabase.
<Tabs <Tabs
scrollable scrollable
@@ -213,7 +213,7 @@ export const GET = async ({ url, locals: { supabase } }) => {
### Generate types from your database ### Generate types from your database
In order to get the most out of TypeScript and its IntelliSense, you should import the generated Database types into the `app.d.ts` type definition file that comes with your SvelteKit project, where `import('./DatabaseDefinitions')` points to the generated types file outlined in [v2 docs here](https://supabase.com/docs/reference/javascript/release-notes#typescript-support) after you have logged in, linked, and generated types through the Supabase CLI. In order to get the most out of TypeScript and its IntelliSense, you should import the generated Database types into the `app.d.ts` type definition file that comes with your SvelteKit project, where `import('./DatabaseDefinitions')` points to the generated types file outlined in [v2 docs here](/docs/reference/javascript/release-notes#typescript-support) after you have logged in, linked, and generated types through the Supabase CLI.
```ts src/app.d.ts ```ts src/app.d.ts
// src/app.d.ts // src/app.d.ts
@@ -368,7 +368,7 @@ export const load = async ({ fetch, data, depends }) => {
<Admonition type="note"> <Admonition type="note">
TypeScript types can be [generated with the Supabase CLI](https://supabase.com/docs/reference/javascript/typescript-support) and passed to `createSupabaseLoadClient` to add type support to the Supabase client. TypeScript types can be [generated with the Supabase CLI](/docs/reference/javascript/typescript-support) and passed to `createSupabaseLoadClient` to add type support to the Supabase client.
</Admonition> </Admonition>
@@ -785,7 +785,7 @@ export const handle: Handle = sequence(supabase, authorization)
### Client-side data fetching with RLS ### Client-side data fetching with RLS
For [row level security](https://supabase.com/docs/guides/database/postgres/row-level-security) to work properly when fetching data client-side, you need to use `supabaseClient` from `PageData` and only run your query once the session is defined client-side: For [row level security](/docs/guides/database/postgres/row-level-security) to work properly when fetching data client-side, you need to use `supabaseClient` from `PageData` and only run your query once the session is defined client-side:
```svelte src/routes/+page.svelte ```svelte src/routes/+page.svelte
<script lang="ts"> <script lang="ts">

View File

@@ -200,7 +200,7 @@ The `before-user-created` hook solves this by:
- Detecting that a user is about to be created - Detecting that a user is about to be created
- Providing the email address in the `user.email` field - Providing the email address in the `user.email` field
Run the following snippet in your project's [SQL Editor](https://supabase.com/dashboard/project/_/sql/new). This will create a `signup_email_domains` table with some sample data and a `hook_restrict_signup_by_email_domain` function to be called by the `before-user-created` auth hook. Run the following snippet in your project's [SQL Editor](/dashboard/project/_/sql/new). This will create a `signup_email_domains` table with some sample data and a `hook_restrict_signup_by_email_domain` function to be called by the `before-user-created` auth hook.
```sql ```sql
-- Create ENUM type for domain rule classification -- Create ENUM type for domain rule classification
@@ -305,7 +305,7 @@ The `before-user-created` hook solves this by:
- Allowing you to inspect the `app_metadata.provider` - Allowing you to inspect the `app_metadata.provider`
- Knowing the request came from an OAuth flow - Knowing the request came from an OAuth flow
Run the following snippet in your project's [SQL Editor](https://supabase.com/dashboard/project/_/sql/new). This will create a `hook_reject_discord_signups` function to be called by the `before-user-created` auth hook. Run the following snippet in your project's [SQL Editor](/dashboard/project/_/sql/new). This will create a `hook_reject_discord_signups` function to be called by the `before-user-created` auth hook.
```sql ```sql
-- Create the function -- Create the function
@@ -352,7 +352,7 @@ The `before-user-created` hook solves this by:
- Detecting that a user is about to be created - Detecting that a user is about to be created
- Providing the IP address in the `metadata.ip_address` field - Providing the IP address in the `metadata.ip_address` field
Run the following snippet in your project's [SQL Editor](https://supabase.com/dashboard/project/_/sql/new). This will create a `signup_networks` table with some sample data and a `hook_restrict_signup_by_network` function to be called by the `before-user-created` auth hook. Run the following snippet in your project's [SQL Editor](/dashboard/project/_/sql/new). This will create a `signup_networks` table with some sample data and a `hook_restrict_signup_by_network` function to be called by the `before-user-created` auth hook.
```sql SQL_EDITOR ```sql SQL_EDITOR
-- Create ENUM type for network rule classification -- Create ENUM type for network rule classification
@@ -607,7 +607,7 @@ The `before-user-created` hook solves this by:
- Detecting that a user is about to be created - Detecting that a user is about to be created
- Providing the IP address in the `metadata.ip_address` field - Providing the IP address in the `metadata.ip_address` field
Before creating the edge function run the following snippet in your project's [SQL Editor](https://supabase.com/dashboard/project/_/sql/new). This will create a `signup_networks` table with some sample data and a `hook_restrict_signup_by_network` function to be called by the `before-user-created` auth hook. Before creating the edge function run the following snippet in your project's [SQL Editor](/dashboard/project/_/sql/new). This will create a `signup_networks` table with some sample data and a `hook_restrict_signup_by_network` function to be called by the `before-user-created` auth hook.
```sql SQL_EDITOR ```sql SQL_EDITOR
-- Create ENUM type for network rule classification -- Create ENUM type for network rule classification

View File

@@ -19,16 +19,16 @@ Supabase Auth supports enterprise-level Single Sign-On (SSO) for any identity pr
- PingIdentity - PingIdentity
- OneLogin - OneLogin
If you're having issues with identity provider software not on this list, [open a support ticket](https://supabase.com/dashboard/support/new). If you're having issues with identity provider software not on this list, [open a support ticket](/dashboard/support/new).
## Prerequisites ## Prerequisites
This guide requires the use of the [Supabase CLI](/docs/guides/cli). Make sure you're using version v1.46.4 or higher. You can use `supabase -v` to see the currently installed version. This guide requires the use of the [Supabase CLI](/docs/guides/cli). Make sure you're using version v1.46.4 or higher. You can use `supabase -v` to see the currently installed version.
You can use the `supabase sso` [subcommands](/docs/reference/cli/supabase-sso) to manage your project's configuration. You can use the `supabase sso` [subcommands](/docs/reference/cli/supabase-sso) to manage your project's configuration.
SAML 2.0 support is disabled by default on Supabase projects. You can configure this on the [Auth Providers](https://supabase.com/dashboard/project/_/auth/providers) page on your project. SAML 2.0 support is disabled by default on Supabase projects. You can configure this on the [Auth Providers](/dashboard/project/_/auth/providers) page on your project.
Note that SAML 2.0 support is offered on plans Pro and above. Check the [Pricing](https://supabase.com/pricing) page for more information. Note that SAML 2.0 support is offered on plans Pro and above. Check the [Pricing](/pricing) page for more information.
## Terminology ## Terminology
@@ -134,7 +134,7 @@ CREATE POLICY "View organization settings."
## Managing SAML 2.0 connections ## Managing SAML 2.0 connections
Once you've enabled SAML 2.0 support on your project via the [Auth Providers](https://supabase.com/dashboard/project/_/auth/providers) page in the dashboard, you can use the [Supabase CLI](/docs/reference/cli/supabase-sso) to add, update, remove and view information about identity providers. Once you've enabled SAML 2.0 support on your project via the [Auth Providers](/dashboard/project/_/auth/providers) page in the dashboard, you can use the [Supabase CLI](/docs/reference/cli/supabase-sso) to add, update, remove and view information about identity providers.
### Add a connection ### Add a connection
@@ -346,7 +346,7 @@ supabase sso remove <provider-id> --project-ref <your-project>
If successful, the details of the removed identity provider will be shown. All user accounts from that identity provider will be immediately logged out. User information will remain in the system, but it will no longer be possible for any of those accounts to be accessed in the future, even if you add the connection again. If successful, the details of the removed identity provider will be shown. All user accounts from that identity provider will be immediately logged out. User information will remain in the system, but it will no longer be possible for any of those accounts to be accessed in the future, even if you add the connection again.
If you need to reassign those user accounts to another identity provider, [open a support ticket](https://supabase.com/dashboard/support/new). If you need to reassign those user accounts to another identity provider, [open a support ticket](/dashboard/support/new).
A [list of all](/docs/reference/cli/supabase-sso-list) registered identity providers can be displayed by running: A [list of all](/docs/reference/cli/supabase-sso-list) registered identity providers can be displayed by running:
```bash ```bash
@@ -426,7 +426,7 @@ Should you run into this problem, it is most likely a misconfiguration issue **o
At this time it is not possible to extract the RSA private key used by your project's Supabase Auth server. This is done to keep the private key as secure as possible, given that SAML does not offer an easy way to rotate keys without disrupting service. (Use a SAML 2.0 Metadata URL whenever possible for this reason!) At this time it is not possible to extract the RSA private key used by your project's Supabase Auth server. This is done to keep the private key as secure as possible, given that SAML does not offer an easy way to rotate keys without disrupting service. (Use a SAML 2.0 Metadata URL whenever possible for this reason!)
If you really need access to the key, [open a support ticket](https://supabase.com/dashboard/support/new) and we'll try to support you as best as possible. If you really need access to the key, [open a support ticket](/dashboard/support/new) and we'll try to support you as best as possible.
### Is multi-tenant SSO with SAML supported? ### Is multi-tenant SSO with SAML supported?
@@ -436,7 +436,7 @@ This setup allows you to implement multi-tenant SSO for multiple clients or orga
### Is multi-subdomain SSO with SAML supported? ### Is multi-subdomain SSO with SAML supported?
Yes, also referred to as [cross-origin authentication within the same site](https://web.dev/articles/same-site-same-origin). To redirect to a URL other than the [Site URL](https://supabase.com/docs/guides/auth/redirect-urls), following the SAML response from the IdP, the `redirectTo` option can be added to [`signInWithSSO`](https://supabase.com/docs/reference/javascript/auth-signinwithsso). Yes, also referred to as [cross-origin authentication within the same site](https://web.dev/articles/same-site-same-origin). To redirect to a URL other than the [Site URL](/docs/guides/auth/redirect-urls), following the SAML response from the IdP, the `redirectTo` option can be added to [`signInWithSSO`](/docs/reference/javascript/auth-signinwithsso).
```ts ```ts
import { createClient } from '@supabase/supabase-js' import { createClient } from '@supabase/supabase-js'
@@ -451,7 +451,7 @@ const { data, error } = await supabase.auth.signInWithSSO({
}) })
``` ```
When redirecting to a URL other than the Site URL, a `/callback` endpoint is necessary to process the auth code from the IdP and exchange it for a session. This assumes the [Supabase SSR client](https://supabase.com/docs/guides/auth/server-side/creating-a-client) has already been configured. When redirecting to a URL other than the Site URL, a `/callback` endpoint is necessary to process the auth code from the IdP and exchange it for a session. This assumes the [Supabase SSR client](/docs/guides/auth/server-side/creating-a-client) has already been configured.
<Tabs scrollable size="small" type="underlined" defaultActiveId="sveltekit" queryGroup="framework"> <Tabs scrollable size="small" type="underlined" defaultActiveId="sveltekit" queryGroup="framework">

View File

@@ -31,7 +31,7 @@ With Deep Linking, you can configure this redirect to open a specific page. This
} }
``` ```
In your project's [auth settings](https://supabase.com/dashboard/project/_/auth/url-configuration) add the redirect URL, e.g. `com.supabase://**`. In your project's [auth settings](/dashboard/project/_/auth/url-configuration) add the redirect URL, e.g. `com.supabase://**`.
Finally, implement the OAuth and linking handlers. See the [supabase-js reference](/docs/reference/javascript/initializing?example=react-native-options-async-storage) for instructions on initializing the supabase-js client in React Native. Finally, implement the OAuth and linking handlers. See the [supabase-js reference](/docs/reference/javascript/initializing?example=react-native-options-async-storage) for instructions on initializing the supabase-js client in React Native.
@@ -117,7 +117,7 @@ With Deep Linking, you can configure this redirect to open a specific page. This
### Deep link config ### Deep link config
- Go to your [auth settings](https://supabase.com/dashboard/project/_/auth/url-configuration) page. - Go to your [auth settings](/dashboard/project/_/auth/url-configuration) page.
- You need to enter your app redirect callback on `Additional Redirect URLs` field. - You need to enter your app redirect callback on `Additional Redirect URLs` field.
The redirect callback URL should have this format `[YOUR_SCHEME]://[YOUR_HOSTNAME]`. Here, `io.supabase.flutterquickstart://login-callback` is just an example, you can choose whatever you would like for `YOUR_SCHEME` and `YOUR_HOSTNAME` as long as the scheme is unique across the user's device. For this reason, typically a reverse domain of your website is used. The redirect callback URL should have this format `[YOUR_SCHEME]://[YOUR_HOSTNAME]`. Here, `io.supabase.flutterquickstart://login-callback` is just an example, you can choose whatever you would like for `YOUR_SCHEME` and `YOUR_HOSTNAME` as long as the scheme is unique across the user's device. For this reason, typically a reverse domain of your website is used.
@@ -309,7 +309,7 @@ With Deep Linking, you can configure this redirect to open a specific page. This
<TabPanel id="swift" label="Swift"> <TabPanel id="swift" label="Swift">
### Deep link config ### Deep link config
1. Go to your [auth settings](https://supabase.com/dashboard/project/_/auth/url-configuration) page. 1. Go to your [auth settings](/dashboard/project/_/auth/url-configuration) page.
2. Enter your app redirect URL in the `Additional Redirect URLs` field. This is the URL that the user gets redirected to after clicking a magic link. 2. Enter your app redirect URL in the `Additional Redirect URLs` field. This is the URL that the user gets redirected to after clicking a magic link.
The redirect callback URL should have the format `[YOUR_SCHEME]://[YOUR_HOSTNAME]`. Here, `io.supabase.user-management://login-callback` is just an example. You can choose whatever you would like for `YOUR_SCHEME` and `YOUR_HOSTNAME` as long as the scheme is unique across the user's device. For this reason, typically a reverse domain of your website is used. The redirect callback URL should have the format `[YOUR_SCHEME]://[YOUR_HOSTNAME]`. Here, `io.supabase.user-management://login-callback` is just an example. You can choose whatever you would like for `YOUR_SCHEME` and `YOUR_HOSTNAME` as long as the scheme is unique across the user's device. For this reason, typically a reverse domain of your website is used.
@@ -349,7 +349,7 @@ With Deep Linking, you can configure this redirect to open a specific page. This
<TabPanel id="kotlin" label="Android Kotlin"> <TabPanel id="kotlin" label="Android Kotlin">
### Deep link config ### Deep link config
1. Go to your [auth settings](https://supabase.com/dashboard/project/_/auth/url-configuration) page. 1. Go to your [auth settings](/dashboard/project/_/auth/url-configuration) page.
2. Enter your app redirect URL in the `Additional Redirect URLs` field. This is the URL that the user gets redirected to after clicking a magic link. 2. Enter your app redirect URL in the `Additional Redirect URLs` field. This is the URL that the user gets redirected to after clicking a magic link.
The redirect callback URL should have the format `[YOUR_SCHEME]://[YOUR_HOSTNAME]`. Here, `io.supabase.user-management://login-callback` is just an example. You can choose whatever you would like for `YOUR_SCHEME` and `YOUR_HOSTNAME` as long as the scheme is unique across the user's device. For this reason, typically a reverse domain of your website is used. The redirect callback URL should have the format `[YOUR_SCHEME]://[YOUR_HOSTNAME]`. Here, `io.supabase.user-management://login-callback` is just an example. You can choose whatever you would like for `YOUR_SCHEME` and `YOUR_HOSTNAME` as long as the scheme is unique across the user's device. For this reason, typically a reverse domain of your website is used.

View File

@@ -629,7 +629,7 @@ supabase.auth.resetPasswordForEmail(
) )
``` ```
If you are on one of the Kotlin targets that have built-in support for redirect URL handling, such as Android, see [OAuth and OTP link verification](https://supabase.com/docs/reference/kotlin/initializing). If you are on one of the Kotlin targets that have built-in support for redirect URL handling, such as Android, see [OAuth and OTP link verification](/docs/reference/kotlin/initializing).
</TabPanel> </TabPanel>
</$Show> </$Show>

View File

@@ -12,7 +12,7 @@ hideToc: true
Head over to [database.new](https://database.new) and create a new Supabase project. Head over to [database.new](https://database.new) and create a new Supabase project.
Your new database has a table for storing your users. You can see that this table is currently empty by running some SQL in the [SQL Editor](https://supabase.com/dashboard/project/_/sql/new). Your new database has a table for storing your users. You can see that this table is currently empty by running some SQL in the [SQL Editor](/dashboard/project/_/sql/new).
</StepHikeCompact.Details> </StepHikeCompact.Details>
@@ -31,7 +31,7 @@ hideToc: true
<StepHikeCompact.Details title="Create a Next.js app"> <StepHikeCompact.Details title="Create a Next.js app">
Use the `create-next-app` command and the `with-supabase` template, to create a Next.js app pre-configured with: Use the `create-next-app` command and the `with-supabase` template, to create a Next.js app pre-configured with:
- [Cookie-based Auth](https://supabase.com/docs/guides/auth/auth-helpers/nextjs) - [Cookie-based Auth](/docs/guides/auth/auth-helpers/nextjs)
- [TypeScript](https://www.typescriptlang.org/) - [TypeScript](https://www.typescriptlang.org/)
- [Tailwind CSS](https://tailwindcss.com/) - [Tailwind CSS](https://tailwindcss.com/)
@@ -52,7 +52,7 @@ hideToc: true
<StepHikeCompact.Step step={3}> <StepHikeCompact.Step step={3}>
<StepHikeCompact.Details title="Declare Supabase Environment Variables"> <StepHikeCompact.Details title="Declare Supabase Environment Variables">
Rename `.env.example` to `.env.local` and populate with [your project's URL and Anon Key](https://supabase.com/dashboard/project/_/settings/api). Rename `.env.example` to `.env.local` and populate with [your project's URL and Anon Key](/dashboard/project/_/settings/api).
</StepHikeCompact.Details> </StepHikeCompact.Details>
@@ -89,5 +89,5 @@ hideToc: true
## Learn more ## Learn more
- [Setting up Server-Side Auth for Next.js](https://supabase.com/docs/guides/auth/server-side/nextjs) for a Next.js deep dive - [Setting up Server-Side Auth for Next.js](/docs/guides/auth/server-side/nextjs) for a Next.js deep dive
- [Supabase Auth docs](https://supabase.com/docs/guides/auth#authentication) for more Supabase authentication methods - [Supabase Auth docs](/docs/guides/auth#authentication) for more Supabase authentication methods

View File

@@ -10,9 +10,9 @@ hideToc: true
<StepHikeCompact.Step step={1}> <StepHikeCompact.Step step={1}>
<StepHikeCompact.Details title="Create a new Supabase project"> <StepHikeCompact.Details title="Create a new Supabase project">
[Launch a new project](https://supabase.com/dashboard) in the Supabase Dashboard. [Launch a new project](/dashboard) in the Supabase Dashboard.
Your new database has a table for storing your users. You can see that this table is currently empty by running some SQL in the [SQL Editor](https://supabase.com/dashboard/project/_/sql). Your new database has a table for storing your users. You can see that this table is currently empty by running some SQL in the [SQL Editor](/dashboard/project/_/sql).
</StepHikeCompact.Details> </StepHikeCompact.Details>
@@ -64,7 +64,7 @@ hideToc: true
<StepHikeCompact.Step step={4}> <StepHikeCompact.Step step={4}>
<StepHikeCompact.Details title="Set up your login component"> <StepHikeCompact.Details title="Set up your login component">
Create a helper file `lib/supabase.ts` that exports a Supabase client using your [Project URL and public API (anon) key](https://supabase.com/dashboard/project/_/settings/api). Create a helper file `lib/supabase.ts` that exports a Supabase client using your [Project URL and public API (anon) key](/dashboard/project/_/settings/api).
</StepHikeCompact.Details> </StepHikeCompact.Details>
<StepHikeCompact.Code> <StepHikeCompact.Code>

View File

@@ -10,9 +10,9 @@ hideToc: true
<StepHikeCompact.Step step={1}> <StepHikeCompact.Step step={1}>
<StepHikeCompact.Details title="Create a new Supabase project"> <StepHikeCompact.Details title="Create a new Supabase project">
[Launch a new project](https://supabase.com/dashboard) in the Supabase Dashboard. [Launch a new project](/dashboard) in the Supabase Dashboard.
Your new database has a table for storing your users. You can see that this table is currently empty by running some SQL in the [SQL Editor](https://supabase.com/dashboard/project/_/sql). Your new database has a table for storing your users. You can see that this table is currently empty by running some SQL in the [SQL Editor](/dashboard/project/_/sql).
</StepHikeCompact.Details> </StepHikeCompact.Details>
@@ -64,7 +64,7 @@ hideToc: true
<StepHikeCompact.Step step={4}> <StepHikeCompact.Step step={4}>
<StepHikeCompact.Details title="Set up your login component"> <StepHikeCompact.Details title="Set up your login component">
In `App.jsx`, create a Supabase client using your [Project URL and public API (anon) key](https://supabase.com/dashboard/project/_/settings/api). In `App.jsx`, create a Supabase client using your [Project URL and public API (anon) key](/dashboard/project/_/settings/api).
You can configure the Auth component to display whenever there is no session inside `supabase.auth.getSession()` You can configure the Auth component to display whenever there is no session inside `supabase.auth.getSession()`

View File

@@ -17,7 +17,7 @@ To edit the allow list, go to the [URL Configuration](/dashboard/project/_/auth/
## Use wildcards in redirect URLs ## Use wildcards in redirect URLs
Supabase allows you to specify wildcards when adding redirect URLs to the [allow list](https://supabase.com/dashboard/project/_/auth/url-configuration). You can use wildcard match patterns to support preview URLs from providers like Netlify and Vercel. Supabase allows you to specify wildcards when adding redirect URLs to the [allow list](/dashboard/project/_/auth/url-configuration). You can use wildcard match patterns to support preview URLs from providers like Netlify and Vercel.
| Wildcard | Description | | Wildcard | Description |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ |

View File

@@ -406,7 +406,7 @@ If you have email confirmation turned on (the default), a new user will receive
Change the email template to support a server-side authentication flow. Change the email template to support a server-side authentication flow.
Go to the [Auth templates](https://supabase.com/dashboard/project/_/auth/templates) page in your dashboard. In the `Confirm signup` template, change `{{ .ConfirmationURL }}` to `{{ .SiteURL }}/auth/confirm?token_hash={{ .TokenHash }}&type=email`. Go to the [Auth templates](/dashboard/project/_/auth/templates) page in your dashboard. In the `Confirm signup` template, change `{{ .ConfirmationURL }}` to `{{ .SiteURL }}/auth/confirm?token_hash={{ .TokenHash }}&type=email`.
</StepHikeCompact.Details> </StepHikeCompact.Details>
@@ -804,7 +804,7 @@ If you have email confirmation turned on (the default), a new user will receive
Change the email template to support a server-side authentication flow. Change the email template to support a server-side authentication flow.
Go to the [Auth templates](https://supabase.com/dashboard/project/_/auth/templates) page in your dashboard. In the `Confirm signup` template, change `{{ .ConfirmationURL }}` to `{{ .SiteURL }}/api/auth/confirm?token_hash={{ .TokenHash }}&type=email`. Go to the [Auth templates](/dashboard/project/_/auth/templates) page in your dashboard. In the `Confirm signup` template, change `{{ .ConfirmationURL }}` to `{{ .SiteURL }}/api/auth/confirm?token_hash={{ .TokenHash }}&type=email`.
</StepHikeCompact.Details> </StepHikeCompact.Details>
@@ -941,7 +941,7 @@ export async function getServerSideProps(context: GetServerSidePropsContext) {
You can also fetch static data at build time using Supabase. Note that there's no session or user at build time, so the data will be the same for everyone who sees the page. You can also fetch static data at build time using Supabase. Note that there's no session or user at build time, so the data will be the same for everyone who sees the page.
Add some colors data to your database by running the [Colors Quickstart](https://supabase.com/dashboard/project/_/sql/quickstarts) in the dashboard. Add some colors data to your database by running the [Colors Quickstart](/dashboard/project/_/sql/quickstarts) in the dashboard.
Then fetch the colors data using `getStaticProps` with the client from `@/utils/supabase/static-props.ts`. Then fetch the colors data using `getStaticProps` with the client from `@/utils/supabase/static-props.ts`.

View File

@@ -370,7 +370,7 @@ If you have email confirmation turned on (the default), a new user will receive
Change the email template to support a server-side authentication flow. Change the email template to support a server-side authentication flow.
Go to the [Auth templates](https://supabase.com/dashboard/project/_/auth/templates) page in your dashboard. In the `Confirm signup` template, change `{{ .ConfirmationURL }}` to `{{ .SiteURL }}/auth/confirm?token_hash={{ .TokenHash }}&type=email`. Go to the [Auth templates](/dashboard/project/_/auth/templates) page in your dashboard. In the `Confirm signup` template, change `{{ .ConfirmationURL }}` to `{{ .SiteURL }}/auth/confirm?token_hash={{ .TokenHash }}&type=email`.
</StepHikeCompact.Details> </StepHikeCompact.Details>

View File

@@ -9,7 +9,7 @@ Supabase Auth supports using [Sign in with Apple](https://developer.apple.com/si
## Overview ## Overview
To support Sign in with Apple, you need to configure the [Apple provider in the Supabase dashboard](https://supabase.com/dashboard/project/_/auth/providers) for your project. To support Sign in with Apple, you need to configure the [Apple provider in the Supabase dashboard](/dashboard/project/_/auth/providers) for your project.
There are three general ways to use Sign in with Apple, depending on the application you're trying to build: There are three general ways to use Sign in with Apple, depending on the application you're trying to build:
@@ -65,7 +65,7 @@ When developing with Expo, you can test Sign in with Apple via the Expo Go app,
4. A **Services ID** which uniquely identifies the web services provided by the app you registered in the previous step. You can create a new Services ID from the [Identifiers](https://developer.apple.com/account/resources/identifiers/list/serviceId) section in the Apple Developer Console (use the filter menu in the upper right side to see all Services IDs). These usually are a reverse domain name string, for example `com.example.app.web`. 4. A **Services ID** which uniquely identifies the web services provided by the app you registered in the previous step. You can create a new Services ID from the [Identifiers](https://developer.apple.com/account/resources/identifiers/list/serviceId) section in the Apple Developer Console (use the filter menu in the upper right side to see all Services IDs). These usually are a reverse domain name string, for example `com.example.app.web`.
5. Configure Website URLs for the newly created **Services ID**. The web domain you should use is the domain your Supabase project is hosted on. This is usually `<project-id>.supabase.co` while the redirect URL is `https://<project-id>.supabase.co/auth/v1/callback`. 5. Configure Website URLs for the newly created **Services ID**. The web domain you should use is the domain your Supabase project is hosted on. This is usually `<project-id>.supabase.co` while the redirect URL is `https://<project-id>.supabase.co/auth/v1/callback`.
6. Create a signing **Key** in the [Keys](https://developer.apple.com/account/resources/authkeys/list) section of the Apple Developer Console. You can use this key to generate a secret key using the tool below, which is added to your Supabase project's Auth configuration. Make sure you safely store the `AuthKey_XXXXXXXXXX.p8` file. If you ever lose access to it, or make it public accidentally, revoke it from the Apple Developer Console and create a new one immediately. You will have to generate a new secret key using this file every 6 months, so make sure you schedule a recurring meeting in your calendar! 6. Create a signing **Key** in the [Keys](https://developer.apple.com/account/resources/authkeys/list) section of the Apple Developer Console. You can use this key to generate a secret key using the tool below, which is added to your Supabase project's Auth configuration. Make sure you safely store the `AuthKey_XXXXXXXXXX.p8` file. If you ever lose access to it, or make it public accidentally, revoke it from the Apple Developer Console and create a new one immediately. You will have to generate a new secret key using this file every 6 months, so make sure you schedule a recurring meeting in your calendar!
7. Finally, add the information you configured above to the [Apple provider configuration in the Supabase dashboard](https://supabase.com/dashboard/project/_/auth/providers). 7. Finally, add the information you configured above to the [Apple provider configuration in the Supabase dashboard](/dashboard/project/_/auth/providers).
You can also configure the Apple auth provider using the Management API: You can also configure the Apple auth provider using the Management API:
@@ -133,7 +133,7 @@ curl -X PATCH "https://api.supabase.com/v1/projects/$PROJECT_REF/config/auth" \
1. Have an **App ID** which uniquely identifies the app you are building. You can create a new App ID from the [Identifiers](https://developer.apple.com/account/resources/identifiers/list/bundleId) section in the Apple Developer Console (use the filter menu in the upper right side to see all App IDs). These usually are a reverse domain name string, for example `com.example.app`. Make sure you configure Sign in with Apple for the App ID you created or already have, in the Capabilities list. At this time Supabase Auth does not support Server-to-Server notification endpoints, so you should leave that setting blank. (In the past App IDs were referred to as _bundle IDs._) 1. Have an **App ID** which uniquely identifies the app you are building. You can create a new App ID from the [Identifiers](https://developer.apple.com/account/resources/identifiers/list/bundleId) section in the Apple Developer Console (use the filter menu in the upper right side to see all App IDs). These usually are a reverse domain name string, for example `com.example.app`. Make sure you configure Sign in with Apple for the App ID you created or already have, in the Capabilities list. At this time Supabase Auth does not support Server-to-Server notification endpoints, so you should leave that setting blank. (In the past App IDs were referred to as _bundle IDs._)
2. Obtain a **Services ID** attached to the App ID that uniquely identifies the website. Use this value as the client ID when initializing Sign in with Apple JS. You can create a new Services ID from the [Identifiers](https://developer.apple.com/account/resources/identifiers/list/serviceId) section in the Apple Developer Console (use the filter menu in the upper right side to see all Services IDs). These usually are a reverse domain name string, for example `com.example.app.website`. 2. Obtain a **Services ID** attached to the App ID that uniquely identifies the website. Use this value as the client ID when initializing Sign in with Apple JS. You can create a new Services ID from the [Identifiers](https://developer.apple.com/account/resources/identifiers/list/serviceId) section in the Apple Developer Console (use the filter menu in the upper right side to see all Services IDs). These usually are a reverse domain name string, for example `com.example.app.website`.
3. Configure Website URLs for the newly created **Services ID**. The web domain you should use is the domain your website is hosted on. The redirect URL must also point to a page on your website that will receive the callback from Apple. 3. Configure Website URLs for the newly created **Services ID**. The web domain you should use is the domain your website is hosted on. The redirect URL must also point to a page on your website that will receive the callback from Apple.
4. Register the Services ID you created to your project's [Apple provider configuration in the Supabase dashboard](https://supabase.com/dashboard/project/_/auth/providers) under _Client IDs_. 4. Register the Services ID you created to your project's [Apple provider configuration in the Supabase dashboard](/dashboard/project/_/auth/providers) under _Client IDs_.
<Admonition type="note"> <Admonition type="note">
@@ -208,18 +208,18 @@ curl -X PATCH "https://api.supabase.com/v1/projects/$PROJECT_REF/config/auth" \
<Admonition type="note"> <Admonition type="note">
When testing with Expo Go, the Expo App ID `host.exp.Exponent` will be used. Make sure to add this to the "Client IDs" list in your [Supabase dashboard Apple provider configuration](https://supabase.com/dashboard/project/_/auth/providers)! When testing with Expo Go, the Expo App ID `host.exp.Exponent` will be used. Make sure to add this to the "Client IDs" list in your [Supabase dashboard Apple provider configuration](/dashboard/project/_/auth/providers)!
</Admonition> </Admonition>
<Admonition type="note"> <Admonition type="note">
When testing with Expo development build with custom `bundleIdentifier`, for example com.example.app , com.example.app.dev , com.example.app.preview. Make sure to add all these variants to the "Client IDs" list in your [Supabase dashboard Apple provider configuration](https://supabase.com/dashboard/project/_/auth/providers)! When testing with Expo development build with custom `bundleIdentifier`, for example com.example.app , com.example.app.dev , com.example.app.preview. Make sure to add all these variants to the "Client IDs" list in your [Supabase dashboard Apple provider configuration](/dashboard/project/_/auth/providers)!
</Admonition> </Admonition>
1. Have an **App ID** which uniquely identifies the app you are building. You can create a new App ID from the [Identifiers](https://developer.apple.com/account/resources/identifiers/list/bundleId) section in the Apple Developer Console (use the filter menu in the upper right side to see all App IDs). These usually are a reverse domain name string, for example `com.example.app`. Make sure you configure Sign in with Apple for the App ID you created or already have, in the Capabilities list. At this time Supabase Auth does not support Server-to-Server notification endpoints, so you should leave that setting blank. (In the past App IDs were referred to as _bundle IDs._) 1. Have an **App ID** which uniquely identifies the app you are building. You can create a new App ID from the [Identifiers](https://developer.apple.com/account/resources/identifiers/list/bundleId) section in the Apple Developer Console (use the filter menu in the upper right side to see all App IDs). These usually are a reverse domain name string, for example `com.example.app`. Make sure you configure Sign in with Apple for the App ID you created or already have, in the Capabilities list. At this time Supabase Auth does not support Server-to-Server notification endpoints, so you should leave that setting blank. (In the past App IDs were referred to as _bundle IDs._)
2. Register all of the App IDs that will be using your Supabase project in the [Apple provider configuration in the Supabase dashboard](https://supabase.com/dashboard/project/_/auth/providers) under _Client IDs_. 2. Register all of the App IDs that will be using your Supabase project in the [Apple provider configuration in the Supabase dashboard](/dashboard/project/_/auth/providers) under _Client IDs_.
<Admonition type="note"> <Admonition type="note">
@@ -273,7 +273,7 @@ curl -X PATCH "https://api.supabase.com/v1/projects/$PROJECT_REF/config/auth" \
### Configuration [#flutter-configuration-native-app] ### Configuration [#flutter-configuration-native-app]
1. Have an **App ID** which uniquely identifies the app you are building. You can create a new App ID from the [Identifiers](https://developer.apple.com/account/resources/identifiers/list/bundleId) section in the Apple Developer Console (use the filter menu in the upper right side to see all App IDs). These usually are a reverse domain name string, for example `com.example.app`. Make sure you configure Sign in with Apple for the App ID you created or already have, in the Capabilities list. At this time Supabase Auth does not support Server-to-Server notification endpoints, so you should leave that setting blank. (In the past App IDs were referred to as _bundle IDs._) 1. Have an **App ID** which uniquely identifies the app you are building. You can create a new App ID from the [Identifiers](https://developer.apple.com/account/resources/identifiers/list/bundleId) section in the Apple Developer Console (use the filter menu in the upper right side to see all App IDs). These usually are a reverse domain name string, for example `com.example.app`. Make sure you configure Sign in with Apple for the App ID you created or already have, in the Capabilities list. At this time Supabase Auth does not support Server-to-Server notification endpoints, so you should leave that setting blank. (In the past App IDs were referred to as _bundle IDs._)
2. Register all of the App IDs that will be using your Supabase project in the [Apple provider configuration in the Supabase dashboard](https://supabase.com/dashboard/project/_/auth/providers) under _Client IDs_. 2. Register all of the App IDs that will be using your Supabase project in the [Apple provider configuration in the Supabase dashboard](/dashboard/project/_/auth/providers) under _Client IDs_.
## Apple sign in on Android, Web, Windows and Linux ## Apple sign in on Android, Web, Windows and Linux
@@ -308,7 +308,7 @@ curl -X PATCH "https://api.supabase.com/v1/projects/$PROJECT_REF/config/auth" \
4. A **Services ID** which uniquely identifies the web services provided by the app you registered in the previous step. You can create a new Services ID from the [Identifiers](https://developer.apple.com/account/resources/identifiers/list/serviceId) section in the Apple Developer Console (use the filter menu in the upper right side to see all Services IDs). These usually are a reverse domain name string, for example `com.example.app.web`. 4. A **Services ID** which uniquely identifies the web services provided by the app you registered in the previous step. You can create a new Services ID from the [Identifiers](https://developer.apple.com/account/resources/identifiers/list/serviceId) section in the Apple Developer Console (use the filter menu in the upper right side to see all Services IDs). These usually are a reverse domain name string, for example `com.example.app.web`.
5. Configure Website URLs for the newly created **Services ID**. The web domain you should use is the domain your Supabase project is hosted on. This is usually `<project-id>.supabase.co` while the redirect URL is `https://<project-id>.supabase.co/auth/v1/callback`. 5. Configure Website URLs for the newly created **Services ID**. The web domain you should use is the domain your Supabase project is hosted on. This is usually `<project-id>.supabase.co` while the redirect URL is `https://<project-id>.supabase.co/auth/v1/callback`.
6. Create a signing **Key** in the [Keys](https://developer.apple.com/account/resources/authkeys/list) section of the Apple Developer Console. You can use this key to generate a secret key using the tool below, which is added to your Supabase project's Auth configuration. Make sure you safely store the `AuthKey_XXXXXXXXXX.p8` file. If you ever lose access to it, or make it public accidentally, revoke it from the Apple Developer Console and create a new one immediately. You will have to generate a new secret key using this file every 6 months, so make sure you schedule a recurring reminder in your calendar! 6. Create a signing **Key** in the [Keys](https://developer.apple.com/account/resources/authkeys/list) section of the Apple Developer Console. You can use this key to generate a secret key using the tool below, which is added to your Supabase project's Auth configuration. Make sure you safely store the `AuthKey_XXXXXXXXXX.p8` file. If you ever lose access to it, or make it public accidentally, revoke it from the Apple Developer Console and create a new one immediately. You will have to generate a new secret key using this file every 6 months, so make sure you schedule a recurring reminder in your calendar!
7. Finally, add the information you configured above to the [Apple provider configuration in the Supabase dashboard](https://supabase.com/dashboard/project/_/auth/providers). 7. Finally, add the information you configured above to the [Apple provider configuration in the Supabase dashboard](/dashboard/project/_/auth/providers).
<Admonition type="tip"> <Admonition type="tip">
@@ -371,7 +371,7 @@ curl -X PATCH "https://api.supabase.com/v1/projects/$PROJECT_REF/config/auth" \
### Configuration [#swift-configuration-native-app] ### Configuration [#swift-configuration-native-app]
1. Have an **App ID** which uniquely identifies the app you are building. You can create a new App ID from the [Identifiers](https://developer.apple.com/account/resources/identifiers/list/bundleId) section in the Apple Developer Console (use the filter menu in the upper right side to see all App IDs). These usually are a reverse domain name string, for example `com.example.app`. Make sure you configure Sign in with Apple for the App ID you created or already have, in the Capabilities list. At this time Supabase Auth does not support Server-to-Server notification endpoints, so you should leave that setting blank. (In the past App IDs were referred to as _bundle IDs._) 1. Have an **App ID** which uniquely identifies the app you are building. You can create a new App ID from the [Identifiers](https://developer.apple.com/account/resources/identifiers/list/bundleId) section in the Apple Developer Console (use the filter menu in the upper right side to see all App IDs). These usually are a reverse domain name string, for example `com.example.app`. Make sure you configure Sign in with Apple for the App ID you created or already have, in the Capabilities list. At this time Supabase Auth does not support Server-to-Server notification endpoints, so you should leave that setting blank. (In the past App IDs were referred to as _bundle IDs._)
2. Register all of the App IDs that will be using your Supabase project in the [Apple provider configuration in the Supabase dashboard](https://supabase.com/dashboard/project/_/auth/providers) under _Client IDs_. 2. Register all of the App IDs that will be using your Supabase project in the [Apple provider configuration in the Supabase dashboard](/dashboard/project/_/auth/providers) under _Client IDs_.
<Admonition type="note"> <Admonition type="note">
@@ -388,7 +388,7 @@ curl -X PATCH "https://api.supabase.com/v1/projects/$PROJECT_REF/config/auth" \
## Using native sign in with Apple in Kotlin ## Using native sign in with Apple in Kotlin
When using [Compose Multiplatform](https://github.com/JetBrains/compose-multiplatform/), you can use the [compose-auth](https://supabase.com/docs/reference/kotlin/installing) plugin. On iOS it uses Native Apple Login automatically and on other platforms it uses `gotrue.signInWith(Apple)`. When using [Compose Multiplatform](https://github.com/JetBrains/compose-multiplatform/), you can use the [compose-auth](/docs/reference/kotlin/installing) plugin. On iOS it uses Native Apple Login automatically and on other platforms it uses `gotrue.signInWith(Apple)`.
**Initialize the Supabase Client** **Initialize the Supabase Client**

View File

@@ -11,7 +11,7 @@ To enable Bitbucket Auth for your project, you need to set up a Bitbucket OAuth
Setting up Bitbucket logins for your application consists of 3 parts: Setting up Bitbucket logins for your application consists of 3 parts:
- Create and configure a Bitbucket OAuth Consumer on [Bitbucket](https://bitbucket.org) - Create and configure a Bitbucket OAuth Consumer on [Bitbucket](https://bitbucket.org)
- Add your Bitbucket OAuth Consumer keys to your [Supabase Project](https://supabase.com/dashboard) - Add your Bitbucket OAuth Consumer keys to your [Supabase Project](/dashboard)
- Add the login code to your [Supabase JS Client App](https://github.com/supabase/supabase-js) - Add the login code to your [Supabase JS Client App](https://github.com/supabase/supabase-js)
## Access your Bitbucket account ## Access your Bitbucket account

View File

@@ -11,7 +11,7 @@ To enable Discord Auth for your project, you need to set up a Discord Applicatio
Setting up Discord logins for your application consists of 3 parts: Setting up Discord logins for your application consists of 3 parts:
- Create and configure a Discord Application [Discord Developer Portal](https://discord.com/developers) - Create and configure a Discord Application [Discord Developer Portal](https://discord.com/developers)
- Add your Discord OAuth Consumer keys to your [Supabase Project](https://supabase.com/dashboard) - Add your Discord OAuth Consumer keys to your [Supabase Project](/dashboard)
- Add the login code to your [Supabase JS Client App](https://github.com/supabase/supabase-js) - Add the login code to your [Supabase JS Client App](https://github.com/supabase/supabase-js)
## Access your Discord account ## Access your Discord account

View File

@@ -11,7 +11,7 @@ To enable Facebook Auth for your project, you need to set up a Facebook OAuth ap
Setting up Facebook logins for your application consists of 3 parts: Setting up Facebook logins for your application consists of 3 parts:
- Create and configure a Facebook Application on the [Facebook Developers Site](https://developers.facebook.com) - Create and configure a Facebook Application on the [Facebook Developers Site](https://developers.facebook.com)
- Add your Facebook keys to your [Supabase Project](https://supabase.com/dashboard) - Add your Facebook keys to your [Supabase Project](/dashboard)
- Add the login code to your [Supabase JS Client App](https://github.com/supabase/supabase-js) - Add the login code to your [Supabase JS Client App](https://github.com/supabase/supabase-js)
## Access your Facebook Developer account ## Access your Facebook Developer account

View File

@@ -11,7 +11,7 @@ To enable GitHub Auth for your project, you need to set up a GitHub OAuth applic
Setting up GitHub logins for your application consists of 3 parts: Setting up GitHub logins for your application consists of 3 parts:
- Create and configure a GitHub OAuth App on [GitHub](https://github.com) - Create and configure a GitHub OAuth App on [GitHub](https://github.com)
- Add your GitHub OAuth keys to your [Supabase Project](https://supabase.com/dashboard) - Add your GitHub OAuth keys to your [Supabase Project](/dashboard)
- Add the login code to your [Supabase JS Client App](https://github.com/supabase/supabase-js) - Add the login code to your [Supabase JS Client App](https://github.com/supabase/supabase-js)
## Find your callback URL ## Find your callback URL

View File

@@ -11,7 +11,7 @@ To enable GitLab Auth for your project, you need to set up a GitLab OAuth applic
Setting up GitLab logins for your application consists of 3 parts: Setting up GitLab logins for your application consists of 3 parts:
- Create and configure a GitLab Application on [GitLab](https://gitlab.com) - Create and configure a GitLab Application on [GitLab](https://gitlab.com)
- Add your GitLab Application keys to your [Supabase Project](https://supabase.com/dashboard) - Add your GitLab Application keys to your [Supabase Project](/dashboard)
- Add the login code to your [Supabase JS Client App](https://github.com/supabase/supabase-js) - Add the login code to your [Supabase JS Client App](https://github.com/supabase/supabase-js)
## Access your GitLab account ## Access your GitLab account

View File

@@ -98,7 +98,7 @@ To use Google's pre-built signin buttons:
- You will have a different set of SHA-1 certificate fingerprints for testing locally and going to production. Make sure to add both to the Google Cloud Console, and add all of the Client IDs to the Supabase dashboard. - You will have a different set of SHA-1 certificate fingerprints for testing locally and going to production. Make sure to add both to the Google Cloud Console, and add all of the Client IDs to the Supabase dashboard.
- For iOS, use the instructions on screen to provide the app Bundle ID, and App Store ID and Team ID if the app is already published on the Apple App Store. - For iOS, use the instructions on screen to provide the app Bundle ID, and App Store ID and Team ID if the app is already published on the Apple App Store.
2. Configure the [OAuth Consent Screen](https://console.cloud.google.com/apis/credentials/consent). This information is shown to the user when giving consent to your app. In particular, make sure you have set up links to your app's privacy policy and terms of service. 2. Configure the [OAuth Consent Screen](https://console.cloud.google.com/apis/credentials/consent). This information is shown to the user when giving consent to your app. In particular, make sure you have set up links to your app's privacy policy and terms of service.
3. Finally, add the client ID from step 1 in the [Google provider on the Supabase Dashboard](https://supabase.com/dashboard/project/_/auth/providers), under _Client IDs_. 3. Finally, add the client ID from step 1 in the [Google provider on the Supabase Dashboard](/dashboard/project/_/auth/providers), under _Client IDs_.
Note that you do not have to configure the OAuth flow in the Supabase Dashboard in order to use native sign in. Note that you do not have to configure the OAuth flow in the Supabase Dashboard in order to use native sign in.
@@ -114,7 +114,7 @@ To use Google's pre-built signin buttons:
- You will have a different set of SHA-1 certificate fingerprint for testing locally and going to production. Make sure to add both to the Google Cloud Console. and add all of the Client IDs to Supabase dashboard. - You will have a different set of SHA-1 certificate fingerprint for testing locally and going to production. Make sure to add both to the Google Cloud Console. and add all of the Client IDs to Supabase dashboard.
- For iOS, use the instructions on screen to provide the app Bundle ID, and App Store ID and Team ID if the app is already published on the Apple App Store. - For iOS, use the instructions on screen to provide the app Bundle ID, and App Store ID and Team ID if the app is already published on the Apple App Store.
2. Configure the [OAuth Consent Screen](https://console.cloud.google.com/apis/credentials/consent). This information is shown to the user when giving consent to your app. In particular, make sure you have set up links to your app's privacy policy and terms of service. 2. Configure the [OAuth Consent Screen](https://console.cloud.google.com/apis/credentials/consent). This information is shown to the user when giving consent to your app. In particular, make sure you have set up links to your app's privacy policy and terms of service.
3. Add only the web client ID from step 1 in the [Google provider on the Supabase Dashboard](https://supabase.com/dashboard/project/_/auth/providers), under _Client IDs_. If you need iOS support, enable the `Skip nonce check` option. 3. Add only the web client ID from step 1 in the [Google provider on the Supabase Dashboard](/dashboard/project/_/auth/providers), under _Client IDs_. If you need iOS support, enable the `Skip nonce check` option.
4. For iOS, add the `CFBundleURLTypes` attributes below into the `/ios/Runner/Info.plist` file. 4. For iOS, add the `CFBundleURLTypes` attributes below into the `/ios/Runner/Info.plist` file.
```xml ```xml
<!-- Put me in the [my_project]/ios/Runner/Info.plist file --> <!-- Put me in the [my_project]/ios/Runner/Info.plist file -->
@@ -141,7 +141,7 @@ To use Google's pre-built signin buttons:
1. Obtain OAuth credentials for your Google Cloud project in the [Credentials](https://console.developers.google.com/apis/credentials) page of the console. If you already have a web client ID, no need to create a new one. When creating a new credential, choose _Web application_. In _Authorized redirect URIs_ enter `https://<project-id>.supabase.co/auth/v1/callback`. This URL will be seen by your users, and you can customize it by configuring [custom domains](/docs/guides/platform/custom-domains). 1. Obtain OAuth credentials for your Google Cloud project in the [Credentials](https://console.developers.google.com/apis/credentials) page of the console. If you already have a web client ID, no need to create a new one. When creating a new credential, choose _Web application_. In _Authorized redirect URIs_ enter `https://<project-id>.supabase.co/auth/v1/callback`. This URL will be seen by your users, and you can customize it by configuring [custom domains](/docs/guides/platform/custom-domains).
2. Configure the [OAuth Consent Screen](https://console.cloud.google.com/apis/credentials/consent). This information is shown to the user when giving consent to your app. Within _Authorized domains_ make sure you add your Supabase project's domain `<project-id>.supabase.co`. Configure the non-sensitive scopes by making sure the following ones are selected: `.../auth/userinfo.email`, `.../auth/userinfo.profile`, `openid`. If you're selecting other sensitive scopes, your app may require additional verification. In those cases, it's best to use [custom domains](/docs/guides/platform/custom-domains). 2. Configure the [OAuth Consent Screen](https://console.cloud.google.com/apis/credentials/consent). This information is shown to the user when giving consent to your app. Within _Authorized domains_ make sure you add your Supabase project's domain `<project-id>.supabase.co`. Configure the non-sensitive scopes by making sure the following ones are selected: `.../auth/userinfo.email`, `.../auth/userinfo.profile`, `openid`. If you're selecting other sensitive scopes, your app may require additional verification. In those cases, it's best to use [custom domains](/docs/guides/platform/custom-domains).
3. Finally, add the client ID and secret from step 1 in the [Google provider on the Supabase Dashboard](https://supabase.com/dashboard/project/_/auth/providers). 3. Finally, add the client ID and secret from step 1 in the [Google provider on the Supabase Dashboard](/dashboard/project/_/auth/providers).
</TabPanel> </TabPanel>
@@ -188,7 +188,7 @@ To use Google's pre-built signin buttons:
1. Follow the integration instructions on the [get started with Google Sign-In](https://developers.google.com/identity/sign-in/ios/start-integrating) for the iOS guide. 1. Follow the integration instructions on the [get started with Google Sign-In](https://developers.google.com/identity/sign-in/ios/start-integrating) for the iOS guide.
2. Configure the [OAuth Consent Screen](https://console.cloud.google.com/apis/credentials/consent). This information is shown to the user when giving consent to your app. In particular, make sure you have set up links to your app's privacy policy and terms of service. 2. Configure the [OAuth Consent Screen](https://console.cloud.google.com/apis/credentials/consent). This information is shown to the user when giving consent to your app. In particular, make sure you have set up links to your app's privacy policy and terms of service.
3. Add web client ID and iOS client ID from step 1 in the [Google provider on the Supabase Dashboard](https://supabase.com/dashboard/project/_/auth/providers), under _Client IDs_, separated by a comma. Enable the `Skip nonce check` option. 3. Add web client ID and iOS client ID from step 1 in the [Google provider on the Supabase Dashboard](/dashboard/project/_/auth/providers), under _Client IDs_, separated by a comma. Enable the `Skip nonce check` option.
</TabPanel> </TabPanel>
</$Show> </$Show>
@@ -199,7 +199,7 @@ To use Google's pre-built signin buttons:
1. Configure OAuth credentials for your Google Cloud project in the [Credentials](https://console.cloud.google.com/apis/credentials) page of the console. You need two client IDs, a web client ID and Android client ID. When creating a new Android OAuth client ID, use the instructions on screen to provide the SHA-1 certificate fingerprint used to sign your Android app. 1. Configure OAuth credentials for your Google Cloud project in the [Credentials](https://console.cloud.google.com/apis/credentials) page of the console. You need two client IDs, a web client ID and Android client ID. When creating a new Android OAuth client ID, use the instructions on screen to provide the SHA-1 certificate fingerprint used to sign your Android app.
2. Configure the [OAuth Consent Screen](https://console.cloud.google.com/apis/credentials/consent). This information is shown to the user when giving consent to your app. In particular, make sure you have set up links to your app's privacy policy and terms of service. 2. Configure the [OAuth Consent Screen](https://console.cloud.google.com/apis/credentials/consent). This information is shown to the user when giving consent to your app. In particular, make sure you have set up links to your app's privacy policy and terms of service.
3. Finally, add the web client ID from step 1 in the [Google provider on the Supabase Dashboard](https://supabase.com/dashboard/project/_/auth/providers), under _Client IDs_. 3. Finally, add the web client ID from step 1 in the [Google provider on the Supabase Dashboard](/dashboard/project/_/auth/providers), under _Client IDs_.
Note that you do not have to configure the OAuth flow in the Supabase Dashboard in order to use native sign in. Note that you do not have to configure the OAuth flow in the Supabase Dashboard in order to use native sign in.
@@ -211,7 +211,7 @@ To use Google's pre-built signin buttons:
- For iOS, use the instructions on screen to provide the app Bundle ID, and App Store ID and Team ID if the app is already published on the Apple App Store. - For iOS, use the instructions on screen to provide the app Bundle ID, and App Store ID and Team ID if the app is already published on the Apple App Store.
2. Configure the [OAuth Consent Screen](https://console.cloud.google.com/apis/credentials/consent). This information is shown to the user when giving consent to your app. In particular, make sure you have set up links to your app's privacy policy and terms of service. 2. Configure the [OAuth Consent Screen](https://console.cloud.google.com/apis/credentials/consent). This information is shown to the user when giving consent to your app. In particular, make sure you have set up links to your app's privacy policy and terms of service.
3. Finally, add the client ID from step 1 in the [Google provider on the Supabase Dashboard](https://supabase.com/dashboard/project/_/auth/providers), under _Client IDs_. 3. Finally, add the client ID from step 1 in the [Google provider on the Supabase Dashboard](/dashboard/project/_/auth/providers), under _Client IDs_.
Note that you do not have to configure the OAuth flow in the Supabase Dashboard in order to use native sign in. Note that you do not have to configure the OAuth flow in the Supabase Dashboard in order to use native sign in.
@@ -223,7 +223,7 @@ To use Google's pre-built signin buttons:
1. Configure OAuth credentials for your Google Cloud project in the [Credentials](https://console.cloud.google.com/apis/credentials) page of the console. When creating a new OAuth client ID, choose _Chrome extension_ for the application type. For _Item ID_ provide the unique ID of your Chrome extension. You can get this by calling `chrome.runtime.id` within the extension, or from the Web Store URL of the extension. For example, the [Google Translate extension](https://chrome.google.com/webstore/detail/google-translate/aapbdbdomjkkjkaonfhkkikfgjllcleb) has the Web Store URL `https://chrome.google.com/webstore/detail/google-translate/aapbdbdomjkkjkaonfhkkikfgjllcleb` and the last part `aapbdbdomjkkjkaonfhkkikfgjllcleb` is its unique ID. 1. Configure OAuth credentials for your Google Cloud project in the [Credentials](https://console.cloud.google.com/apis/credentials) page of the console. When creating a new OAuth client ID, choose _Chrome extension_ for the application type. For _Item ID_ provide the unique ID of your Chrome extension. You can get this by calling `chrome.runtime.id` within the extension, or from the Web Store URL of the extension. For example, the [Google Translate extension](https://chrome.google.com/webstore/detail/google-translate/aapbdbdomjkkjkaonfhkkikfgjllcleb) has the Web Store URL `https://chrome.google.com/webstore/detail/google-translate/aapbdbdomjkkjkaonfhkkikfgjllcleb` and the last part `aapbdbdomjkkjkaonfhkkikfgjllcleb` is its unique ID.
2. Configure the [OAuth Consent Screen](https://console.cloud.google.com/apis/credentials/consent). This information is shown to the user when giving consent to your app. 2. Configure the [OAuth Consent Screen](https://console.cloud.google.com/apis/credentials/consent). This information is shown to the user when giving consent to your app.
3. Finally, add the client ID from step 1 in the [Google provider on the Supabase Dashboard](https://supabase.com/dashboard/project/_/auth/providers), under _Client IDs_. 3. Finally, add the client ID from step 1 in the [Google provider on the Supabase Dashboard](/dashboard/project/_/auth/providers), under _Client IDs_.
Note that you do not have to configure the OAuth flow in the Supabase Dashboard to sign in with Google inside Chrome extensions. Note that you do not have to configure the OAuth flow in the Supabase Dashboard to sign in with Google inside Chrome extensions.
@@ -694,7 +694,7 @@ fun GoogleSignInButton() {
### Using Google sign-in with Kotlin Multiplatform ### Using Google sign-in with Kotlin Multiplatform
When using [Compose Multiplatform](https://www.jetbrains.com/lp/compose-multiplatform/), you can use the [compose-auth](https://supabase.com/docs/reference/kotlin/installing) plugin. On Android it uses the Credential Manager automatically and on other platforms it uses `auth.signInWith(Google)`. When using [Compose Multiplatform](https://www.jetbrains.com/lp/compose-multiplatform/), you can use the [compose-auth](/docs/reference/kotlin/installing) plugin. On Android it uses the Credential Manager automatically and on other platforms it uses `auth.signInWith(Google)`.
**Initialize the Supabase Client** **Initialize the Supabase Client**

View File

@@ -14,7 +14,7 @@ Kakao OAuth consists of six broad steps:
- Obtaining a `REST API key` - this will serve as the `client_id`. - Obtaining a `REST API key` - this will serve as the `client_id`.
- Generating the `Client secret code` - this will serve as the `client_secret`. - Generating the `Client secret code` - this will serve as the `client_secret`.
- Additional configurations on Kakao Developers Portal. - Additional configurations on Kakao Developers Portal.
- Add your `client id` and `client secret` keys to your [Supabase Project](https://supabase.com/dashboard). - Add your `client id` and `client secret` keys to your [Supabase Project](/dashboard).
- Add the login code to your [Supabase JS Client App](https://github.com/supabase/supabase-js). - Add the login code to your [Supabase JS Client App](https://github.com/supabase/supabase-js).
## Access your Kakao Developer account ## Access your Kakao Developer account

View File

@@ -11,7 +11,7 @@ To enable LinkedIn Auth for your project, you need to set up a LinkedIn OAuth ap
Setting up LinkedIn logins for your application consists of 3 parts: Setting up LinkedIn logins for your application consists of 3 parts:
- Create and configure a LinkedIn Project and App on the [LinkedIn Developer Dashboard](https://www.linkedin.com/developers/apps). - Create and configure a LinkedIn Project and App on the [LinkedIn Developer Dashboard](https://www.linkedin.com/developers/apps).
- Add your _LinkedIn (OIDC)_ `client_id` and `client_secret` to your [Supabase Project](https://supabase.com/dashboard). - Add your _LinkedIn (OIDC)_ `client_id` and `client_secret` to your [Supabase Project](/dashboard).
- Add the login code to your [Supabase JS Client App](https://github.com/supabase/supabase-js). - Add the login code to your [Supabase JS Client App](https://github.com/supabase/supabase-js).
## Access your LinkedIn Developer account ## Access your LinkedIn Developer account

View File

@@ -11,7 +11,7 @@ To enable Notion Auth for your project, you need to set up a Notion Application
Setting up Notion logins for your application consists of 3 parts: Setting up Notion logins for your application consists of 3 parts:
- Create and configure a Notion Application [Notion Developer Portal](https://www.notion.so/my-integrations) - Create and configure a Notion Application [Notion Developer Portal](https://www.notion.so/my-integrations)
- Retrieve your OAuth client ID and OAuth client secret and add them to your [Supabase Project](https://supabase.com/dashboard) - Retrieve your OAuth client ID and OAuth client secret and add them to your [Supabase Project](/dashboard)
- Add the login code to your [Supabase JS Client App](https://github.com/supabase/supabase-js) - Add the login code to your [Supabase JS Client App](https://github.com/supabase/supabase-js)
## Create your notion integration ## Create your notion integration

View File

@@ -17,7 +17,7 @@ We will be replacing the existing Slack provider with a new Slack (OIDC) provide
Setting up Slack logins for your application consists of 3 parts: Setting up Slack logins for your application consists of 3 parts:
- Create and configure a Slack Project and App on the [Slack Developer Dashboard](https://api.slack.com/apps). - Create and configure a Slack Project and App on the [Slack Developer Dashboard](https://api.slack.com/apps).
- Add your Slack `API Key` and `API Secret Key` to your [Supabase Project](https://supabase.com/dashboard). - Add your Slack `API Key` and `API Secret Key` to your [Supabase Project](/dashboard).
- Add the login code to your [Supabase JS Client App](https://github.com/supabase/supabase-js). - Add the login code to your [Supabase JS Client App](https://github.com/supabase/supabase-js).
## Access your Slack Developer account ## Access your Slack Developer account

View File

@@ -11,7 +11,7 @@ To enable Spotify Auth for your project, you need to set up a Spotify OAuth appl
Setting up Spotify logins for your application consists of 3 parts: Setting up Spotify logins for your application consists of 3 parts:
- Create and configure a Spotify Project and App on the [Spotify Developer Dashboard](https://developer.spotify.com/dashboard/). - Create and configure a Spotify Project and App on the [Spotify Developer Dashboard](https://developer.spotify.com/dashboard/).
- Add your Spotify `API Key` and `API Secret Key` to your [Supabase Project](https://supabase.com/dashboard). - Add your Spotify `API Key` and `API Secret Key` to your [Supabase Project](/dashboard).
- Add the login code to your [Supabase JS Client App](https://github.com/supabase/supabase-js). - Add the login code to your [Supabase JS Client App](https://github.com/supabase/supabase-js).
## Access your Spotify Developer account ## Access your Spotify Developer account

View File

@@ -11,7 +11,7 @@ To enable Twitch Auth for your project, you need to set up a Twitch Application
Setting up Twitch logins for your application consists of 3 parts: Setting up Twitch logins for your application consists of 3 parts:
- Create and configure a Twitch Application [Twitch Developer Console](https://dev.twitch.tv/console) - Create and configure a Twitch Application [Twitch Developer Console](https://dev.twitch.tv/console)
- Add your Twitch OAuth Consumer keys to your [Supabase Project](https://supabase.com/dashboard) - Add your Twitch OAuth Consumer keys to your [Supabase Project](/dashboard)
- Add the login code to your [Supabase JS Client App](https://github.com/supabase/supabase-js) - Add the login code to your [Supabase JS Client App](https://github.com/supabase/supabase-js)
## Access your Twitch Developer account ## Access your Twitch Developer account

View File

@@ -11,7 +11,7 @@ To enable Twitter Auth for your project, you need to set up a Twitter OAuth appl
Setting up Twitter logins for your application consists of 3 parts: Setting up Twitter logins for your application consists of 3 parts:
- Create and configure a Twitter Project and App on the [Twitter Developer Dashboard](https://developer.twitter.com/en/portal/dashboard). - Create and configure a Twitter Project and App on the [Twitter Developer Dashboard](https://developer.twitter.com/en/portal/dashboard).
- Add your Twitter `API Key` and `API Secret Key` to your [Supabase Project](https://supabase.com/dashboard). - Add your Twitter `API Key` and `API Secret Key` to your [Supabase Project](/dashboard).
- Add the login code to your [Supabase JS Client App](https://github.com/supabase/supabase-js). - Add the login code to your [Supabase JS Client App](https://github.com/supabase/supabase-js).
## Access your Twitter Developer account ## Access your Twitter Developer account

View File

@@ -11,7 +11,7 @@ To enable Zoom Auth for your project, you need to set up a Zoom OAuth applicatio
Setting up Zoom logins for your application consists of 3 parts: Setting up Zoom logins for your application consists of 3 parts:
- Create and configure a Zoom OAuth App on [Zoom App Marketplace](https://marketplace.zoom.us/) - Create and configure a Zoom OAuth App on [Zoom App Marketplace](https://marketplace.zoom.us/)
- Add your Zoom OAuth keys to your [Supabase Project](https://supabase.com/dashboard) - Add your Zoom OAuth keys to your [Supabase Project](/dashboard)
- Add the login code to your [Supabase JS Client App](https://github.com/supabase/supabase-js) - Add the login code to your [Supabase JS Client App](https://github.com/supabase/supabase-js)
## Access your Zoom Developer account ## Access your Zoom Developer account

View File

@@ -123,7 +123,7 @@ This example uses a restrictive RLS policy checks that the [second factor verifi
## Deprecated integration with JWT templates ## Deprecated integration with JWT templates
As of 1st April 2025 the previously available [Clerk Integration with Supabase](https://supabase.com/partners/integrations/clerk) is considered deprecated and is no longer recommended for use. All projects using the deprecated integration will be excluded from Third-Party Monthly Active User (TP-MAU) charges until at least 1st January 2026. As of 1st April 2025 the previously available [Clerk Integration with Supabase](/partners/integrations/clerk) is considered deprecated and is no longer recommended for use. All projects using the deprecated integration will be excluded from Third-Party Monthly Active User (TP-MAU) charges until at least 1st January 2026.
This integration used low-level primitives that are still available in Supabase and Clerk, such as a [configurable JWT secret](/dashboard/project/_/settings/api) and [JWT templates from Clerk](https://clerk.com/docs/backend-requests/jwt-templates). This enables you to keep using it in an unofficial manner, though only limited support will be provided from Supabase. This integration used low-level primitives that are still available in Supabase and Clerk, such as a [configurable JWT secret](/dashboard/project/_/settings/api) and [JWT templates from Clerk](https://clerk.com/docs/backend-requests/jwt-templates). This enables you to keep using it in an unofficial manner, though only limited support will be provided from Supabase.

View File

@@ -5,7 +5,7 @@ subtitle: 'Schedule Recurring Jobs with Cron Syntax in Postgres'
Supabase Cron is a Postgres Module that simplifies scheduling recurring Jobs with cron syntax and monitoring Job runs inside Postgres. Supabase Cron is a Postgres Module that simplifies scheduling recurring Jobs with cron syntax and monitoring Job runs inside Postgres.
Cron Jobs can be created via SQL or the [Integrations -> Cron](https://supabase.com/dashboard/project/_/integrations) interface inside the Dashboard, and can run anywhere from every second to once a year depending on your use case. Cron Jobs can be created via SQL or the [Integrations -> Cron](/dashboard/project/_/integrations) interface inside the Dashboard, and can run anywhere from every second to once a year depending on your use case.
<Image <Image
alt="Manage cron jobs via the Dashboard" alt="Manage cron jobs via the Dashboard"

View File

@@ -299,4 +299,4 @@ Be extremely careful when setting up Jobs for system maintenance tasks as they c
For instance, scheduling a command to terminate idle connections with `pg_terminate_backend(pid)` can disrupt critical background processes like nightly backups. Often, there is an existing Postgres setting, such as `idle_session_timeout`, that can perform these common maintenance tasks without the risk. For instance, scheduling a command to terminate idle connections with `pg_terminate_backend(pid)` can disrupt critical background processes like nightly backups. Often, there is an existing Postgres setting, such as `idle_session_timeout`, that can perform these common maintenance tasks without the risk.
Reach out to [Supabase Support](https://supabase.com/support) if you're unsure if that applies to your use case. Reach out to [Supabase Support](/support) if you're unsure if that applies to your use case.

View File

@@ -19,7 +19,7 @@ Create a test table with a text array (an array of strings):
> >
<TabPanel id="dashboard" label="Dashboard"> <TabPanel id="dashboard" label="Dashboard">
1. Go to the [Table editor](https://supabase.com/dashboard/project/_/editor) page in the Dashboard. 1. Go to the [Table editor](/dashboard/project/_/editor) page in the Dashboard.
1. Click **New Table** and create a table with the name `arraytest`. 1. Click **New Table** and create a table with the name `arraytest`.
1. Click **Save**. 1. Click **Save**.
1. Click **New Column** and create a column with the name `textarray`, type `text`, and select **Define as array**. 1. Click **New Column** and create a column with the name `textarray`, type `text`, and select **Define as array**.
@@ -49,7 +49,7 @@ create table arraytest (
> >
<TabPanel id="dashboard" label="Dashboard"> <TabPanel id="dashboard" label="Dashboard">
1. Go to the [Table editor](https://supabase.com/dashboard/project/_/editor) page in the Dashboard. 1. Go to the [Table editor](/dashboard/project/_/editor) page in the Dashboard.
1. Select the `arraytest` table. 1. Select the `arraytest` table.
1. Click **Insert row** and add `["Harry", "Larry", "Moe"]`. 1. Click **Insert row** and add `["Harry", "Larry", "Moe"]`.
1. Click **Save.** 1. Click **Save.**
@@ -131,7 +131,7 @@ supabase.from_('arraytest').insert(
> >
<TabPanel id="dashboard" label="Dashboard"> <TabPanel id="dashboard" label="Dashboard">
1. Go to the [Table editor](https://supabase.com/dashboard/project/_/editor) page in the Dashboard. 1. Go to the [Table editor](/dashboard/project/_/editor) page in the Dashboard.
1. Select the `arraytest` table. 1. Select the `arraytest` table.
You should see: You should see:

View File

@@ -28,7 +28,7 @@ hideToc: true
<StepHikeCompact.Details title="Get your connection credentials"> <StepHikeCompact.Details title="Get your connection credentials">
Get your connection credentials from the [**Connect** panel](https://supabase.com/dashboard/project/_/?showConnect=true). You will need: Get your connection credentials from the [**Connect** panel](/dashboard/project/_/?showConnect=true). You will need:
- host - host
- username - username
- password - password
@@ -50,7 +50,7 @@ hideToc: true
<StepHikeCompact.Details title="Download your SSL Certificate"> <StepHikeCompact.Details title="Download your SSL Certificate">
Download your SSL certificate from the Dashboard's [`Database Settings`](https://supabase.com/dashboard/project/_/database/settings) Download your SSL certificate from the Dashboard's [`Database Settings`](/dashboard/project/_/database/settings)
![SSL](/docs/img/guides/database/connecting-to-postgres/beekeeper-studio/certificate.png) ![SSL](/docs/img/guides/database/connecting-to-postgres/beekeeper-studio/certificate.png)
</StepHikeCompact.Details> </StepHikeCompact.Details>

View File

@@ -77,7 +77,7 @@ The connection string looks like this:
postgresql://postgres:[YOUR-PASSWORD]@db.apbkobhfnmcqqzqeeqss.supabase.co:5432/postgres postgresql://postgres:[YOUR-PASSWORD]@db.apbkobhfnmcqqzqeeqss.supabase.co:5432/postgres
``` ```
Get your project's direct connection string from your project dashboard by clicking [Connect](https://supabase.com/dashboard/project/_?showConnect=true). Get your project's direct connection string from your project dashboard by clicking [Connect](/dashboard/project/_?showConnect=true).
## Shared pooler ## Shared pooler
@@ -93,7 +93,7 @@ The connection string looks like this:
postgres://postgres.apbkobhfnmcqqzqeeqss:[YOUR-PASSWORD]@aws-0-[REGION].pooler.supabase.com:5432/postgres postgres://postgres.apbkobhfnmcqqzqeeqss:[YOUR-PASSWORD]@aws-0-[REGION].pooler.supabase.com:5432/postgres
``` ```
Get your project's Session pooler connection string from your project dashboard by clicking [Connect](https://supabase.com/dashboard/project/_?showConnect=true). Get your project's Session pooler connection string from your project dashboard by clicking [Connect](/dashboard/project/_?showConnect=true).
### Supavisor transaction mode ### Supavisor transaction mode
@@ -111,7 +111,7 @@ The connection string looks like this:
postgres://postgres.apbkobhfnmcqqzqeeqss:[YOUR-PASSWORD]@aws-0-[REGION].pooler.supabase.com:6543/postgres postgres://postgres.apbkobhfnmcqqzqeeqss:[YOUR-PASSWORD]@aws-0-[REGION].pooler.supabase.com:6543/postgres
``` ```
Get your project's Transaction pooler connection string from your project dashboard by clicking [Connect](https://supabase.com/dashboard/project/_?showConnect=true). Get your project's Transaction pooler connection string from your project dashboard by clicking [Connect](/dashboard/project/_?showConnect=true).
## Dedicated pooler ## Dedicated pooler
@@ -119,7 +119,7 @@ For paying customers, we provision a Dedicated Pooler ([PgBouncer](https://www.p
The Dedicated Pooler ensures best performance and latency, while using up more of your project's compute resources. If your network supports IPv6 or you have the IPv4 add-on, we encourage you to use the Dedicated Pooler over the Shared Pooler. The Dedicated Pooler ensures best performance and latency, while using up more of your project's compute resources. If your network supports IPv6 or you have the IPv4 add-on, we encourage you to use the Dedicated Pooler over the Shared Pooler.
Get your project's Dedicated pooler connection string from your project dashboard by clicking [Connect](https://supabase.com/dashboard/project/_?showConnect=true). Get your project's Dedicated pooler connection string from your project dashboard by clicking [Connect](/dashboard/project/_?showConnect=true).
<Admonition type="note"> <Admonition type="note">

View File

@@ -64,7 +64,7 @@ Choose one of these Vercel Deploy Templates which use our [Vercel Deploy Integra
### Manual configuration ### Manual configuration
In your [`Database Settings`](https://supabase.com/dashboard/project/_?showConnect=true) and copy the URI from the `Transaction pooler` section and save it as the `POSTGRES_URL` environment variable. Remember to replace the password placeholder with your actual database password and add the following suffix `?workaround=supabase-pooler.vercel`. In your [`Database Settings`](/dashboard/project/_?showConnect=true) and copy the URI from the `Transaction pooler` section and save it as the `POSTGRES_URL` environment variable. Remember to replace the password placeholder with your actual database password and add the following suffix `?workaround=supabase-pooler.vercel`.
```txt .env.local ```txt .env.local
POSTGRES_URL="postgres://postgres.cfcxynqnhdybqtbhjemm:[YOUR-PASSWORD]@aws-0-ap-southeast-1.pooler.supabase.com:6543/postgres?workaround=supabase-pooler.vercel" POSTGRES_URL="postgres://postgres.cfcxynqnhdybqtbhjemm:[YOUR-PASSWORD]@aws-0-ap-southeast-1.pooler.supabase.com:6543/postgres?workaround=supabase-pooler.vercel"

View File

@@ -24,7 +24,7 @@ select * from pg_settings;
### User-context settings ### User-context settings
The [`pg_settings`](https://www.postgresql.org/docs/current/view-pg-settings.html) table's `context` column specifies the requirements for changing a setting. By default, those with a `user` context can be changed at the `role` or `database` level with [SQL](https://supabase.com/dashboard/project/_/sql/). The [`pg_settings`](https://www.postgresql.org/docs/current/view-pg-settings.html) table's `context` column specifies the requirements for changing a setting. By default, those with a `user` context can be changed at the `role` or `database` level with [SQL](/dashboard/project/_/sql/).
To list all user-context settings, run: To list all user-context settings, run:
@@ -46,7 +46,7 @@ show "statement_timeout";
### Superuser settings ### Superuser settings
Some settings can only be modified by a superuser. Supabase pre-enables the [`supautils` extension](https://supabase.com/blog/roles-postgres-hooks#setting-up-the-supautils-extension), which allows the `postgres` role to retain certain superuser privileges. It enables modification of the below reserved configurations at the `role` level: Some settings can only be modified by a superuser. Supabase pre-enables the [`supautils` extension](/blog/roles-postgres-hooks#setting-up-the-supautils-extension), which allows the `postgres` role to retain certain superuser privileges. It enables modification of the below reserved configurations at the `role` level:
| Setting | Description | | Setting | Description |
| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -60,9 +60,9 @@ Some settings can only be modified by a superuser. Supabase pre-enables the [`su
| `pg_net.ttl` | Sets how long the [pg_net extension](/docs/guides/database/extensions/pg_net) saves responses | | `pg_net.ttl` | Sets how long the [pg_net extension](/docs/guides/database/extensions/pg_net) saves responses |
| `pg_net.batch_size` | Sets how many requests the [pg_net extension](/docs/guides/database/extensions/pg_net) can make per second | | `pg_net.batch_size` | Sets how many requests the [pg_net extension](/docs/guides/database/extensions/pg_net) can make per second |
| `pg_stat_statements.*` | Configures the [pg_stat_statements extension](https://www.postgresql.org/docs/current/pgstatstatements.html). | | `pg_stat_statements.*` | Configures the [pg_stat_statements extension](https://www.postgresql.org/docs/current/pgstatstatements.html). |
| `pgaudit.*` | Configures the [PGAudit extension](https://supabase.com/docs/guides/database/extensions/pgaudit). The `log_parameter` is still restricted to protect secrets | | `pgaudit.*` | Configures the [PGAudit extension](/docs/guides/database/extensions/pgaudit). The `log_parameter` is still restricted to protect secrets |
| `pgrst.*` | [`PostgREST` settings](https://docs.postgrest.org/en/stable/references/configuration.html#db-aggregates-enabled) | | `pgrst.*` | [`PostgREST` settings](https://docs.postgrest.org/en/stable/references/configuration.html#db-aggregates-enabled) |
| `plan_filter.*` | Configures the [pg_plan_filter extension](https://supabase.com/docs/guides/database/extensions/pg_plan_filter) | | `plan_filter.*` | Configures the [pg_plan_filter extension](/docs/guides/database/extensions/pg_plan_filter) |
| `session_replication_role` | Sets the session's behavior for triggers and rewrite rules. | | `session_replication_role` | Sets the session's behavior for triggers and rewrite rules. |
| `track_io_timing` | Collects timing statistics for database I/O activity. | | `track_io_timing` | Collects timing statistics for database I/O activity. |
| `wal_compression` | This parameter enables compression of WAL using the specified compression method. | | `wal_compression` | This parameter enables compression of WAL using the specified compression method. |
@@ -103,7 +103,7 @@ In order to overwrite the default settings, you must have `Owner` or `Administra
<Admonition type="tip"> <Admonition type="tip">
If a setting you need is not yet configurable, [share your use case with us](https://supabase.com/dashboard/support/new)! Let us know what setting you'd like to control, and we'll consider adding support in future updates. If a setting you need is not yet configurable, [share your use case with us](/dashboard/support/new)! Let us know what setting you'd like to control, and we'll consider adding support in future updates.
</Admonition> </Admonition>

View File

@@ -32,7 +32,7 @@ If you do not have DBeaver, you can download it from its [website](https://dbeav
<StepHikeCompact.Step step={3}> <StepHikeCompact.Step step={3}>
<StepHikeCompact.Details title="Get Your Credentials"> <StepHikeCompact.Details title="Get Your Credentials">
On your project dashboard, click [Connect](https://supabase.com/dashboard/project/_?showConnect=true), note your session pooler's: On your project dashboard, click [Connect](/dashboard/project/_?showConnect=true), note your session pooler's:
- host - host
- username - username
@@ -64,7 +64,7 @@ If you do not have DBeaver, you can download it from its [website](https://dbeav
<StepHikeCompact.Step step={5}> <StepHikeCompact.Step step={5}>
<StepHikeCompact.Details title="Download certificate"> <StepHikeCompact.Details title="Download certificate">
In the [Database Settings](https://supabase.com/dashboard/project/_/database/settings), download your SSL certificate. In the [Database Settings](/dashboard/project/_/database/settings), download your SSL certificate.
</StepHikeCompact.Details> </StepHikeCompact.Details>
<StepHikeCompact.Code> <StepHikeCompact.Code>

View File

@@ -12,7 +12,7 @@ hideToc: true
<Admonition type="note"> <Admonition type="note">
If you plan on solely using Drizzle instead of the Supabase Data API (PostgREST), you can turn off the latter in the [API Settings](https://supabase.com/dashboard/project/_/settings/api). If you plan on solely using Drizzle instead of the Supabase Data API (PostgREST), you can turn off the latter in the [API Settings](/dashboard/project/_/settings/api).
</Admonition> </Admonition>
<StepHikeCompact> <StepHikeCompact>
@@ -66,7 +66,7 @@ If you plan on solely using Drizzle instead of the Supabase Data API (PostgREST)
Connect to your database using the Connection Pooler. Connect to your database using the Connection Pooler.
From the project [**Connect** panel](https://supabase.com/dashboard/project/_?showConnect=true), copy the URI from the "Shared Pooler" option and save it as the `DATABASE_URL` environment variable. Remember to replace the password placeholder with your actual database password. From the project [**Connect** panel](/dashboard/project/_?showConnect=true), copy the URI from the "Shared Pooler" option and save it as the `DATABASE_URL` environment variable. Remember to replace the password placeholder with your actual database password.
</StepHikeCompact.Details> </StepHikeCompact.Details>

View File

@@ -18,7 +18,7 @@ Supabase has pre-installed some of the most useful open source extensions.
> >
<TabPanel id="dashboard" label="Dashboard"> <TabPanel id="dashboard" label="Dashboard">
1. Go to the [Database](https://supabase.com/dashboard/project/_/database/tables) page in the Dashboard. 1. Go to the [Database](/dashboard/project/_/database/tables) page in the Dashboard.
2. Click **Extensions** in the sidebar. 2. Click **Extensions** in the sidebar.
3. Enable or disable an extension. 3. Enable or disable an extension.
@@ -56,7 +56,7 @@ In addition to the pre-configured extensions, you can also install your own SQL
### Upgrade extensions ### Upgrade extensions
If a new version of an extension becomes available on Supabase, you need to initiate a software upgrade in the [Infrastructure Settings](https://supabase.com/dashboard/project/_/settings/infrastructure) to access it. Software upgrades can also be initiated by restarting your server in the [General Settings](https://supabase.com/dashboard/project/_/settings/general). If a new version of an extension becomes available on Supabase, you need to initiate a software upgrade in the [Infrastructure Settings](/dashboard/project/_/settings/infrastructure) to access it. Software upgrades can also be initiated by restarting your server in the [General Settings](/dashboard/project/_/settings/general).
### Full list of extensions ### Full list of extensions

View File

@@ -44,7 +44,7 @@ You can use the `http` extension to make these network requests from Postgres.
> >
<TabPanel id="dashboard" label="Dashboard"> <TabPanel id="dashboard" label="Dashboard">
1. Go to the [Database](https://supabase.com/dashboard/project/_/database/tables) page in the Dashboard. 1. Go to the [Database](/dashboard/project/_/database/tables) page in the Dashboard.
2. Click on **Extensions** in the sidebar. 2. Click on **Extensions** in the sidebar.
3. Search for `http` and enable the extension. 3. Search for `http` and enable the extension.

View File

@@ -19,7 +19,7 @@ The motivation for HypoPG is to allow users to quickly search for an index to im
> >
<TabPanel id="dashboard" label="Dashboard"> <TabPanel id="dashboard" label="Dashboard">
1. Go to the [Database](https://supabase.com/dashboard/project/_/database/tables) page in the Dashboard. 1. Go to the [Database](/dashboard/project/_/database/tables) page in the Dashboard.
2. Click on **Extensions** in the sidebar. 2. Click on **Extensions** in the sidebar.
3. Search for `hypopg` and enable the extension. 3. Search for `hypopg` and enable the extension.

View File

@@ -23,7 +23,7 @@ For more information about how the SQL schema is reflected into a GraphQL schema
> >
<TabPanel id="dashboard" label="Dashboard"> <TabPanel id="dashboard" label="Dashboard">
1. Go to the [Database](https://supabase.com/dashboard/project/_/database/tables) page in the Dashboard. 1. Go to the [Database](/dashboard/project/_/database/tables) page in the Dashboard.
2. Click on **Extensions** in the sidebar. 2. Click on **Extensions** in the sidebar.
3. Search for "pg_graphql" and enable the extension. 3. Search for "pg_graphql" and enable the extension.

View File

@@ -17,7 +17,7 @@ description: 'Generate Short UIDs from Numbers'
> >
<TabPanel id="dashboard" label="Dashboard"> <TabPanel id="dashboard" label="Dashboard">
1. Go to the [Database](https://supabase.com/dashboard/project/_/database/tables) page in the Dashboard. 1. Go to the [Database](/dashboard/project/_/database/tables) page in the Dashboard.
2. Click on **Extensions** in the sidebar. 2. Click on **Extensions** in the sidebar.
3. Search for "pg_hashids" and enable the extension. 3. Search for "pg_hashids" and enable the extension.

View File

@@ -18,7 +18,7 @@ tocVideo: 'amJo48ChLGs'
> >
<TabPanel id="dashboard" label="Dashboard"> <TabPanel id="dashboard" label="Dashboard">
1. Go to the [Database](https://supabase.com/dashboard/project/_/database/tables) page in the Dashboard. 1. Go to the [Database](/dashboard/project/_/database/tables) page in the Dashboard.
2. Click on **Extensions** in the sidebar. 2. Click on **Extensions** in the sidebar.
3. Search for `pg_jsonschema` and enable the extension. 3. Search for `pg_jsonschema` and enable the extension.

View File

@@ -10,7 +10,7 @@ The pg_net API is in beta. Functions signatures may change.
</Admonition> </Admonition>
[pg_net](https://github.com/supabase/pg_net/) enables Postgres to make asynchronous HTTP/HTTPS requests in SQL. It differs from the [`http`](https://supabase.com/docs/guides/database/extensions/http) extension in that it is asynchronous by default. This makes it useful in blocking functions (like triggers). [pg_net](https://github.com/supabase/pg_net/) enables Postgres to make asynchronous HTTP/HTTPS requests in SQL. It differs from the [`http`](/docs/guides/database/extensions/http) extension in that it is asynchronous by default. This makes it useful in blocking functions (like triggers).
It eliminates the need for servers to continuously poll for database changes and instead allows the database to proactively notify external resources about significant events. It eliminates the need for servers to continuously poll for database changes and instead allows the database to proactively notify external resources about significant events.
@@ -25,7 +25,7 @@ It eliminates the need for servers to continuously poll for database changes and
> >
<TabPanel id="dashboard" label="Dashboard"> <TabPanel id="dashboard" label="Dashboard">
1. Go to the [Database](https://supabase.com/dashboard/project/_/database/tables) page in the Dashboard. 1. Go to the [Database](/dashboard/project/_/database/tables) page in the Dashboard.
2. Click on **Extensions** in the sidebar. 2. Click on **Extensions** in the sidebar.
3. Search for "pg_net" and enable the extension. 3. Search for "pg_net" and enable the extension.
@@ -58,7 +58,7 @@ Creates an HTTP GET request returning the request's ID. HTTP requests are not st
<Admonition type="caution"> <Admonition type="caution">
This is a Postgres [SECURITY DEFINER](https://supabase.com/docs/guides/database/postgres/row-level-security#use-security-definer-functions) function. This is a Postgres [SECURITY DEFINER](/docs/guides/database/postgres/row-level-security#use-security-definer-functions) function.
</Admonition> </Admonition>
@@ -104,7 +104,7 @@ The body's character set encoding matches the database's `server_encoding` setti
<Admonition type="caution"> <Admonition type="caution">
This is a Postgres [SECURITY DEFINER](https://supabase.com/docs/guides/database/postgres/row-level-security#use-security-definer-functions) function This is a Postgres [SECURITY DEFINER](/docs/guides/database/postgres/row-level-security#use-security-definer-functions) function
</Admonition> </Admonition>
@@ -151,7 +151,7 @@ Creates an HTTP DELETE request, returning the request's ID. HTTP requests are no
<Admonition type="caution"> <Admonition type="caution">
This is a Postgres [SECURITY DEFINER](https://supabase.com/docs/guides/database/postgres/row-level-security#use-security-definer-functions) function This is a Postgres [SECURITY DEFINER](/docs/guides/database/postgres/row-level-security#use-security-definer-functions) function
</Admonition> </Admonition>
@@ -226,7 +226,7 @@ The responses can be observed with the following query:
select * from net._http_response; select * from net._http_response;
``` ```
The data can also be observed in the `net` schema with the [Supabase Dashboard's SQL Editor](https://supabase.com/dashboard/project/_/editor) The data can also be observed in the `net` schema with the [Supabase Dashboard's SQL Editor](/dashboard/project/_/editor)
## Debugging requests ## Debugging requests
@@ -256,7 +256,7 @@ where id = <request_id>
-- including the body sent: {"key": "value", "key": 5} -- including the body sent: {"key": "value", "key": 5}
``` ```
Alternatively, by wrapping a request in a [database function](https://supabase.com/docs/guides/database/functions), sent row data can be logged or returned for inspection and debugging. Alternatively, by wrapping a request in a [database function](/docs/guides/database/functions), sent row data can be logged or returned for inspection and debugging.
```sql ```sql
create or replace function debugging_example (row_id int) create or replace function debugging_example (row_id int)
@@ -311,7 +311,7 @@ order by "created" desc;
<Admonition type="note" label="Must be on pg_net v0.12.0 or above to reconfigure "> <Admonition type="note" label="Must be on pg_net v0.12.0 or above to reconfigure ">
Supabase supports reconfiguring pg*net starting from v0.12.0+. For the latest release, initiate a Postgres upgrade in the [Infrastructure Settings](https://supabase.com/dashboard/project/*/settings/infrastructure). Supabase supports reconfiguring pg*net starting from v0.12.0+. For the latest release, initiate a Postgres upgrade in the [Infrastructure Settings](/dashboard/project/*/settings/infrastructure).
</Admonition> </Admonition>
@@ -357,7 +357,7 @@ select
) as request_id; ) as request_id;
``` ```
### Call an endpoint every minute with [pg_cron](https://supabase.com/docs/guides/database/extensions/pgcron) ### Call an endpoint every minute with [pg_cron](/docs/guides/database/extensions/pgcron)
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. 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.

View File

@@ -47,7 +47,7 @@ Get started with pg_repack by enabling the extension in the Supabase Dashboard.
> >
<TabPanel id="dashboard" label="Dashboard"> <TabPanel id="dashboard" label="Dashboard">
1. Go to the [Database](https://supabase.com/dashboard/project/_/database/tables) page in the Dashboard. 1. Go to the [Database](/dashboard/project/_/database/tables) page in the Dashboard.
2. Click on **Extensions** in the sidebar. 2. Click on **Extensions** in the sidebar.
3. Search for "pg_repack" and enable the extension. 3. Search for "pg_repack" and enable the extension.

View File

@@ -32,7 +32,7 @@ For more information on query optimization, check out the [query performance gui
> >
<TabPanel id="dashboard" label="Dashboard"> <TabPanel id="dashboard" label="Dashboard">
1. Go to the [Database](https://supabase.com/dashboard/project/_/database/tables) page in the Dashboard. 1. Go to the [Database](/dashboard/project/_/database/tables) page in the Dashboard.
2. Click on **Extensions** in the sidebar. 2. Click on **Extensions** in the sidebar.
3. Search for "pg_stat_statements" and enable the extension. 3. Search for "pg_stat_statements" and enable the extension.

View File

@@ -23,7 +23,7 @@ This helps you with:
> >
<TabPanel id="dashboard" label="Dashboard"> <TabPanel id="dashboard" label="Dashboard">
1. Go to the [Database](https://supabase.com/dashboard/project/_/database/tables) page in the Dashboard. 1. Go to the [Database](/dashboard/project/_/database/tables) page in the Dashboard.
2. Click on **Extensions** in the sidebar. 2. Click on **Extensions** in the sidebar.
3. Search for `pgaudit` and enable the extension. 3. Search for `pgaudit` and enable the extension.
@@ -47,7 +47,7 @@ PGAudit can be configured with different levels of precision.
**PGAudit logging precision:** **PGAudit logging precision:**
- **[Session](#session-logging):** Logs activity within a connection, such as a [psql](https://supabase.com/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/connecting-to-postgres#connecting-with-psql) connection.
- **[User](#user-logging):** Logs activity by a particular database user (for example, `anon` or `postgres`). - **[User](#user-logging):** Logs activity by a particular database user (for example, `anon` or `postgres`).
- **[Global](#global-logging):** Logs activity across the entire database. - **[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). - **[Object](#object-logging):** Logs events related to specific database objects (for example, the auth.users table).
@@ -83,11 +83,11 @@ Below is a limited example of how to assign PGAudit to monitor specific categori
### Session logging ### Session logging
When you are connecting in a session environment, such as a [psql](https://supabase.com/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/connecting-to-postgres#connecting-with-psql) connection, you can configure PGAudit to record events initiated within the session.
<Admonition type="note"> <Admonition type="note">
The [Dashboard](https://supabase.com/dashboard/project/_) is a transactional environment and won't sustain a session. The [Dashboard](/dashboard/project/_) is a transactional environment and won't sustain a session.
</Admonition> </Admonition>
@@ -113,7 +113,7 @@ set pgaudit.log = 'none';
### User logging ### User logging
There are some cases where you may want to monitor a database user's actions. For instance, let's say you connected your database to [Zapier](https://supabase.com/partners/integrations/zapier) and created a custom role for it to use: There are some cases where you may want to monitor a database user's actions. For instance, let's say you connected your database to [Zapier](/partners/integrations/zapier) and created a custom role for it to use:
```sql ```sql
create user "zapier" with password '<new password>'; create user "zapier" with password '<new password>';
@@ -242,7 +242,7 @@ create table account (
); );
``` ```
Generates the following log in the [Dashboard's Postgres Logs](https://supabase.com/dashboard/project/_/logs/postgres-logs): Generates the following log in the [Dashboard's Postgres Logs](/dashboard/project/_/logs/postgres-logs):
``` ```
AUDIT: SESSION,1,1,DDL,CREATE TABLE,TABLE,public.account,create table account( AUDIT: SESSION,1,1,DDL,CREATE TABLE,TABLE,public.account,create table account(
@@ -254,7 +254,7 @@ Generates the following log in the [Dashboard's Postgres Logs](https://supabase.
## Finding and filtering audit logs ## Finding and filtering audit logs
Logs generated by PGAudit can be found in [Postgres Logs](https://supabase.com/dashboard/project/_/logs/postgres-logs?s=AUDIT). To find a specific log, you can use the log explorer. Below is a basic example to extract logs referencing `CREATE TABLE` events Logs generated by PGAudit can be found in [Postgres Logs](/dashboard/project/_/logs/postgres-logs?s=AUDIT). To find a specific log, you can use the log explorer. Below is a basic example to extract logs referencing `CREATE TABLE` events
```sql ```sql
select select
@@ -275,7 +275,7 @@ limit 100;
<Admonition type="note"> <Admonition type="note">
API requests are already recorded in the [API Edge Network](https://supabase.com/dashboard/project/_/logs/edge-logs) logs. API requests are already recorded in the [API Edge Network](/dashboard/project/_/logs/edge-logs) logs.
</Admonition> </Admonition>
@@ -292,7 +292,7 @@ alter role "authenticator" set pgaudit.log to 'write';
### Monitoring the `auth.users` table ### Monitoring the `auth.users` table
In the worst case scenario, where a privileged roles' password is exposed, you can use PGAudit to monitor if the `auth.users` table was targeted. It should be stated that API requests are already monitored in the [API Edge Network](https://supabase.com/dashboard/project/_/logs/edge-logs) and this is more about providing greater clarity about what is happening at the database level. In the worst case scenario, where a privileged roles' password is exposed, you can use PGAudit to monitor if the `auth.users` table was targeted. It should be stated that API requests are already monitored in the [API Edge Network](/dashboard/project/_/logs/edge-logs) and this is more about providing greater clarity about what is happening at the database level.
Logging `auth.user` should be done in Object Mode and requires a custom role: Logging `auth.user` should be done in Object Mode and requires a custom role:
@@ -347,11 +347,11 @@ To prevent PGAudit from monitoring the problematic roles, you'll want to change
#### Using PGAudit to debug database functions #### Using PGAudit to debug database functions
Technically yes, but it is not the best approach. It is better to check out our [function debugging guide](https://supabase.com/docs/guides/database/functions#general-logging) instead. Technically yes, but it is not the best approach. It is better to check out our [function debugging guide](/docs/guides/database/functions#general-logging) instead.
#### Downloading database logs #### Downloading database logs
In the [Logs Dashboard](https://supabase.com/dashboard/project/_/logs/postgres-logs) you can download logs as CSVs. In the [Logs Dashboard](/dashboard/project/_/logs/postgres-logs) you can download logs as CSVs.
#### Logging observed table rows #### Logging observed table rows
@@ -369,7 +369,7 @@ You should not do this unless you are _absolutely_ certain it is necessary for y
#### Logging function parameters #### Logging function parameters
We don't currently support configuring `pgaudit.log_parameter` because it may log secrets in encrypted columns if you are using [pgsodium](https://supabase.com/docs/guides/database/extensions/pgsodium) or[Vault](https://supabase.com/docs/guides/database/vault). We don't currently support configuring `pgaudit.log_parameter` because it may log secrets in encrypted columns if you are using [pgsodium](/docs/guides/database/extensions/pgsodium) or[Vault](/docs/guides/database/vault).
You can upvote this [feature request](https://github.com/orgs/supabase/discussions/20183) with your use-case if you'd like this restriction lifted. You can upvote this [feature request](https://github.com/orgs/supabase/discussions/20183) with your use-case if you'd like this restriction lifted.
@@ -390,6 +390,6 @@ PGAudit's [official documentation](https://www.pgaudit.org) focuses on system an
## Resources ## Resources
- [Official `PGAudit` documentation](https://www.pgaudit.org) - [Official `PGAudit` documentation](https://www.pgaudit.org)
- [Database Function Logging](https://supabase.com/docs/guides/database/functions#general-logging) - [Database Function Logging](/docs/guides/database/functions#general-logging)
- [Supabase Logging](https://supabase.com/docs/guides/platform/logs) - [Supabase Logging](/docs/guides/platform/logs)
- [Self-Hosting Logs](https://supabase.com/docs/reference/self-hosting-analytics/introduction) - [Self-Hosting Logs](/docs/reference/self-hosting-analytics/introduction)

View File

@@ -25,7 +25,7 @@ The [`pgjwt`](https://github.com/michelp/pgjwt) (Postgres JSON Web Token) extens
> >
<TabPanel id="dashboard" label="Dashboard"> <TabPanel id="dashboard" label="Dashboard">
1. Go to the [Database](https://supabase.com/dashboard/project/_/database/tables) page in the Dashboard. 1. Go to the [Database](/dashboard/project/_/database/tables) page in the Dashboard.
2. Click on **Extensions** in the sidebar. 2. Click on **Extensions** in the sidebar.
3. Search for `pgjwt` and enable the extension. 3. Search for `pgjwt` and enable the extension.

View File

@@ -18,7 +18,7 @@ tocVideo: 'Mmmv9g_MiBA'
> >
<TabPanel id="dashboard" label="Dashboard"> <TabPanel id="dashboard" label="Dashboard">
1. Go to the [Database](https://supabase.com/dashboard/project/_/database/tables) page in the Dashboard. 1. Go to the [Database](/dashboard/project/_/database/tables) page in the Dashboard.
2. Click on **Extensions** in the sidebar. 2. Click on **Extensions** in the sidebar.
3. Search for `pgroonga` and enable the extension. 3. Search for `pgroonga` and enable the extension.

View File

@@ -31,7 +31,7 @@ The core functionality of `pgRouting` is a set of path finding algorithms includ
> >
<TabPanel id="dashboard" label="Dashboard"> <TabPanel id="dashboard" label="Dashboard">
1. Go to the [Database](https://supabase.com/dashboard/project/_/database/tables) page in the Dashboard. 1. Go to the [Database](/dashboard/project/_/database/tables) page in the Dashboard.
2. Click on **Extensions** in the sidebar. 2. Click on **Extensions** in the sidebar.
3. Search for `pgrouting` and enable the extension. 3. Search for `pgrouting` and enable the extension.

View File

@@ -27,7 +27,7 @@ Encryption requires keys. Keeping the keys in the same database as the encrypted
## Resources ## Resources
- [Supabase Vault](/docs/guides/database/vault) - [Supabase Vault](/docs/guides/database/vault)
- Read more about Supabase Vault in the [blog post](https://supabase.com/blog/vault-now-in-beta) - Read more about Supabase Vault in the [blog post](/blog/vault-now-in-beta)
- [Supabase Vault on GitHub](https://github.com/supabase/vault) - [Supabase Vault on GitHub](https://github.com/supabase/vault)
## Resources ## Resources

View File

@@ -24,7 +24,7 @@ Let's cover some basic concepts:
> >
<TabPanel id="dashboard" label="Dashboard"> <TabPanel id="dashboard" label="Dashboard">
1. Go to the [Database](https://supabase.com/dashboard/project/_/database/tables) page in the Dashboard. 1. Go to the [Database](/dashboard/project/_/database/tables) page in the Dashboard.
2. Click on **Extensions** in the sidebar. 2. Click on **Extensions** in the sidebar.
3. Search for `pgtap` and enable the extension. 3. Search for `pgtap` and enable the extension.

View File

@@ -4,7 +4,7 @@ title: 'pgvector: Embeddings and vector similarity'
description: 'pgvector: a PostgreSQL extension for storing embeddings and performing vector similarity search.' description: 'pgvector: a PostgreSQL extension for storing embeddings and performing vector similarity search.'
--- ---
[pgvector](https://github.com/pgvector/pgvector/) is a Postgres extension for vector similarity search. It can also be used for storing [embeddings](https://supabase.com/blog/openai-embeddings-postgres-vector). [pgvector](https://github.com/pgvector/pgvector/) is a Postgres extension for vector similarity search. It can also be used for storing [embeddings](/blog/openai-embeddings-postgres-vector).
<Admonition type="note"> <Admonition type="note">
@@ -37,7 +37,7 @@ This is particularly useful if you're building on top of OpenAI's [GPT-3](https:
> >
<TabPanel id="dashboard" label="Dashboard"> <TabPanel id="dashboard" label="Dashboard">
1. Go to the [Database](https://supabase.com/dashboard/project/_/database/tables) page in the Dashboard. 1. Go to the [Database](/dashboard/project/_/database/tables) page in the Dashboard.
2. Click on **Extensions** in the sidebar. 2. Click on **Extensions** in the sidebar.
3. Search for "vector" and enable the extension. 3. Search for "vector" and enable the extension.
@@ -118,7 +118,7 @@ To get the exact number of requested rows, use [iterative search](https://github
## More pgvector and Supabase resources ## More pgvector and Supabase resources
- [Supabase Clippy: ChatGPT for Supabase Docs](https://supabase.com/blog/chatgpt-supabase-docs) - [Supabase Clippy: ChatGPT for Supabase Docs](/blog/chatgpt-supabase-docs)
- [Storing OpenAI embeddings in Postgres with pgvector](https://supabase.com/blog/openai-embeddings-postgres-vector) - [Storing OpenAI embeddings in Postgres with pgvector](/blog/openai-embeddings-postgres-vector)
- [A ChatGPT Plugins Template built with Supabase Edge Runtime](https://supabase.com/blog/building-chatgpt-plugins-template) - [A ChatGPT Plugins Template built with Supabase Edge Runtime](/blog/building-chatgpt-plugins-template)
- [Template for building your own custom ChatGPT style doc search](https://github.com/supabase-community/nextjs-openai-doc-search) - [Template for building your own custom ChatGPT style doc search](https://github.com/supabase-community/nextjs-openai-doc-search)

View File

@@ -17,7 +17,7 @@ description: 'Lint PL/pgSQL code'
> >
<TabPanel id="dashboard" label="Dashboard"> <TabPanel id="dashboard" label="Dashboard">
1. Go to the [Database](https://supabase.com/dashboard/project/_/database/tables) page in the Dashboard. 1. Go to the [Database](/dashboard/project/_/database/tables) page in the Dashboard.
2. Click on **Extensions** in the sidebar. 2. Click on **Extensions** in the sidebar.
3. Search for "plpgsql_check" and enable the extension. 3. Search for "plpgsql_check" and enable the extension.

View File

@@ -30,7 +30,7 @@ It can be used for database functions, triggers, queries and more.
> >
<TabPanel id="dashboard" label="Dashboard"> <TabPanel id="dashboard" label="Dashboard">
1. Go to the [Database](https://supabase.com/dashboard/project/_/database/tables) page in the Dashboard. 1. Go to the [Database](/dashboard/project/_/database/tables) page in the Dashboard.
2. Click on **Extensions** in the sidebar. 2. Click on **Extensions** in the sidebar.
3. Search for "plv8" and enable the extension. 3. Search for "plv8" and enable the extension.

View File

@@ -26,7 +26,7 @@ You can get started with PostGIS by enabling the PostGIS extension in your Supab
> >
<TabPanel id="dashboard" label="Dashboard"> <TabPanel id="dashboard" label="Dashboard">
1. Go to the [Database](https://supabase.com/dashboard/project/_/database/tables) page in the Dashboard. 1. Go to the [Database](/dashboard/project/_/database/tables) page in the Dashboard.
2. Click on **Extensions** in the sidebar. 2. Click on **Extensions** in the sidebar.
3. Search for `postgis` and enable the extension. 3. Search for `postgis` and enable the extension.
4. In the confirmation prompt select "Create a new schema" and name it `gis` for example. 4. In the confirmation prompt select "Create a new schema" and name it `gis` for example.
@@ -204,7 +204,7 @@ At this point, if you go into your Supabase dashboard and look at the data, you
``` ```
We can query the `restaurants` table directly, but it will return the `location` column in the format you see above. We can query the `restaurants` table directly, but it will return the `location` column in the format you see above.
We will create [database functions](https://supabase.com/docs/guides/database/functions) so that we can use the [st_y()](https://postgis.net/docs/ST_Y.html) and [st_x()](https://postgis.net/docs/ST_X.html) function to convert it back to lat and long floating values. We will create [database functions](/docs/guides/database/functions) so that we can use the [st_y()](https://postgis.net/docs/ST_Y.html) and [st_x()](https://postgis.net/docs/ST_X.html) function to convert it back to lat and long floating values.
### Order by distance ### Order by distance
@@ -456,7 +456,7 @@ val data = supabase.postgrest.rpc(
As of PostGIS 2.3 or newer, the PostGIS extension is no longer relocatable from one schema to another. If you need to move it from one schema to another for any reason (e.g. from the public schema to the extensions schema for security reasons), you would normally run a ALTER EXTENSION to relocate the schema. However, you will now to do the following steps: As of PostGIS 2.3 or newer, the PostGIS extension is no longer relocatable from one schema to another. If you need to move it from one schema to another for any reason (e.g. from the public schema to the extensions schema for security reasons), you would normally run a ALTER EXTENSION to relocate the schema. However, you will now to do the following steps:
1. Backup your Database to prevent data loss - You can do this through the [CLI](https://supabase.com/docs/reference/cli/supabase-db-dump) or Postgres backup tools such as [pg_dumpall](https://www.postgresql.org/docs/current/backup-dump.html#BACKUP-DUMP-ALL) 1. Backup your Database to prevent data loss - You can do this through the [CLI](/docs/reference/cli/supabase-db-dump) or Postgres backup tools such as [pg_dumpall](https://www.postgresql.org/docs/current/backup-dump.html#BACKUP-DUMP-ALL)
2. Drop all dependencies you created and the PostGIS extension - `DROP EXTENSION postgis CASCADE;` 2. Drop all dependencies you created and the PostGIS extension - `DROP EXTENSION postgis CASCADE;`
@@ -464,7 +464,7 @@ As of PostGIS 2.3 or newer, the PostGIS extension is no longer relocatable from
4. Restore dropped data via the Backup if necessary from step 1 with your tool of choice. 4. Restore dropped data via the Backup if necessary from step 1 with your tool of choice.
Alternatively, you can contact the [Supabase Support Team](https://supabase.com/dashboard/support/new) and ask them to run the following SQL on your instance: Alternatively, you can contact the [Supabase Support Team](/dashboard/support/new) and ask them to run the following SQL on your instance:
```sql ```sql
BEGIN; BEGIN;

View File

@@ -38,7 +38,7 @@ You can get started with rum by enabling the extension in your Supabase dashboar
> >
<TabPanel id="dashboard" label="Dashboard"> <TabPanel id="dashboard" label="Dashboard">
1. Go to the [Database](https://supabase.com/dashboard/project/_/database/tables) page in the Dashboard. 1. Go to the [Database](/dashboard/project/_/database/tables) page in the Dashboard.
2. Click on **Extensions** in the sidebar. 2. Click on **Extensions** in the sidebar.
3. Search for "rum" and enable the extension. 3. Search for "rum" and enable the extension.

View File

@@ -31,7 +31,7 @@ Supabase projects come with [TimescaleDB Apache 2 Edition](https://docs.timescal
> >
<TabPanel id="dashboard" label="Dashboard"> <TabPanel id="dashboard" label="Dashboard">
1. Go to the [Database](https://supabase.com/dashboard/project/_/database/tables) page in the Dashboard. 1. Go to the [Database](/dashboard/project/_/database/tables) page in the Dashboard.
2. Click on **Extensions** in the sidebar. 2. Click on **Extensions** in the sidebar.
3. Search for `timescaledb` and enable the extension. 3. Search for `timescaledb` and enable the extension.

View File

@@ -25,7 +25,7 @@ Currently `uuid-ossp` extension is enabled by default and cannot be disabled.
> >
<TabPanel id="dashboard" label="Dashboard"> <TabPanel id="dashboard" label="Dashboard">
1. Go to the [Database](https://supabase.com/dashboard/project/_/database/tables) page in the Dashboard. 1. Go to the [Database](/dashboard/project/_/database/tables) page in the Dashboard.
2. Click on **Extensions** in the sidebar. 2. Click on **Extensions** in the sidebar.
3. Search for `uuid-ossp` and enable the extension. 3. Search for `uuid-ossp` and enable the extension.
@@ -92,5 +92,5 @@ create table contacts (
## Resources ## Resources
- [Choosing a Postgres Primary Key](https://supabase.com/blog/choosing-a-postgres-primary-key) - [Choosing a Postgres Primary Key](/blog/choosing-a-postgres-primary-key)
- [The Basics Of Postgres `UUID` Data Type](https://www.postgresqltutorial.com/postgresql-uuid/) - [The Basics Of Postgres `UUID` Data Type](https://www.postgresqltutorial.com/postgresql-uuid/)

View File

@@ -133,9 +133,9 @@ To learn more about Wasm FDW, visit [Wrappers official documentation](https://su
Foreign Data Wrappers do not provide Row Level Security, thus it is not advised to expose them via your API. Wrappers should _always_ be stored in a private schema. For example, if you are connecting to your Stripe account, you should create a `stripe` schema to store all of your foreign tables inside. This schema should _not_ be added to the “Additional Schemas” setting in the API section. Foreign Data Wrappers do not provide Row Level Security, thus it is not advised to expose them via your API. Wrappers should _always_ be stored in a private schema. For example, if you are connecting to your Stripe account, you should create a `stripe` schema to store all of your foreign tables inside. This schema should _not_ be added to the “Additional Schemas” setting in the API section.
If you want to expose any of the foreign table columns to your public API, you can create a [Database Function with security definer](https://supabase.com/docs/guides/database/functions#security-definer-vs-invoker) in the `public` schema, and then you can interact with your foreign table through API. For better access control, the function should have appropriate filters on the foreign table to apply security rules based on your business needs. If you want to expose any of the foreign table columns to your public API, you can create a [Database Function with security definer](/docs/guides/database/functions#security-definer-vs-invoker) in the `public` schema, and then you can interact with your foreign table through API. For better access control, the function should have appropriate filters on the foreign table to apply security rules based on your business needs.
As an example, go to [SQL Editor](https://supabase.com/dashboard/project/_/sql/new) and then follow below steps, As an example, go to [SQL Editor](/dashboard/project/_/sql/new) and then follow below steps,
1. Create a Stripe Products foreign table: 1. Create a Stripe Products foreign table:

View File

@@ -469,7 +469,7 @@ Good targets to log include:
#### General logging #### General logging
To create custom logs in the [Dashboard's Postgres Logs](https://supabase.com/dashboard/project/_/logs/postgres-logs), you can use the `raise` keyword. By default, there are 3 observed severity levels: To create custom logs in the [Dashboard's Postgres Logs](/dashboard/project/_/logs/postgres-logs), you can use the `raise` keyword. By default, there are 3 observed severity levels:
- `log` - `log`
- `warning` - `warning`

View File

@@ -108,7 +108,7 @@ Following commands require `pg_stat_statements` to be enabled: calls, locks, cac
When using `pg_stat_statements` also take note that it only stores the latest 5,000 statements. Moreover, consider resetting the analysis after optimizing any queries by running `select pg_stat_statements_reset();` When using `pg_stat_statements` also take note that it only stores the latest 5,000 statements. Moreover, consider resetting the analysis after optimizing any queries by running `select pg_stat_statements_reset();`
Learn more about pg_stats [here](https://supabase.com/docs/guides/database/extensions/pg_stat_statements). Learn more about pg_stats [here](/docs/guides/database/extensions/pg_stat_statements).
## Using SQL ## Using SQL
@@ -240,7 +240,7 @@ from pg_statio_user_tables;
This shows the ratio of data blocks fetched from the Postgres [shared_buffers](https://www.postgresql.org/docs/15/runtime-config-resource.html#RUNTIME-CONFIG-RESOURCE-MEMORY) cache against the data blocks that were read from disk/OS cache. This shows the ratio of data blocks fetched from the Postgres [shared_buffers](https://www.postgresql.org/docs/15/runtime-config-resource.html#RUNTIME-CONFIG-RESOURCE-MEMORY) cache against the data blocks that were read from disk/OS cache.
If either of your index or table hit rate are < 99% then this can indicate your compute plan is too small for your current workload and you would benefit from more memory. [Upgrading your compute](./compute-add-ons) is easy and can be done from your [project dashboard](https://supabase.com/dashboard/project/_/settings/compute-and-disk). If either of your index or table hit rate are < 99% then this can indicate your compute plan is too small for your current workload and you would benefit from more memory. [Upgrading your compute](./compute-add-ons) is easy and can be done from your [project dashboard](/dashboard/project/_/settings/compute-and-disk).
### Optimizing poor performing queries ### Optimizing poor performing queries

View File

@@ -46,7 +46,7 @@ create table books (
</TabPanel> </TabPanel>
<TabPanel id="dashboard" label="Dashboard"> <TabPanel id="dashboard" label="Dashboard">
1. Go to the [Table Editor](https://supabase.com/dashboard/project/_/editor) page in the Dashboard. 1. Go to the [Table Editor](/dashboard/project/_/editor) page in the Dashboard.
2. Click **New Table** and create a table called `books`. 2. Click **New Table** and create a table called `books`.
3. Include a primary key with the following properties and click save: 3. Include a primary key with the following properties and click save:
@@ -113,7 +113,7 @@ values
</TabPanel> </TabPanel>
<TabPanel id="dashboard" label="Dashboard"> <TabPanel id="dashboard" label="Dashboard">
1. Go to the [Table Editor](https://supabase.com/dashboard/project/_/editor) page in the Dashboard. 1. Go to the [Table Editor](/dashboard/project/_/editor) page in the Dashboard.
2. Select the `books` table in the sidebar. 2. Select the `books` table in the sidebar.
3. Click **+ Insert row** and add 5 rows with the following properties: 3. Click **+ Insert row** and add 5 rows with the following properties:

Some files were not shown because too many files have changed in this diff Show More