Commit Graph
30 Commits
Author SHA1 Message Date
Colum Ferry 95cf9a78a7 docs(cli): show config examples in TOML and JSONC (#53449)
## Problem

The CLI reads `supabase/config.jsonc` (and `config.json`) since v3.1.0,
but every docs page still shows `config.toml` only. There's also no page
explaining the formats, how to switch, the `$schema` / `#:schema`
declaration, or editor setup, and no reference pages for the new
`supabase config convert` and `supabase config validate` commands.

Linear: CLI-2871

## Solution

- **Dual-format examples from one source.** A new directive
(`features/directives/ConfigFormats.ts`) picks up any ```` ```toml ````
fence with `name=supabase/config.toml` and renders it as
`supabase/config.toml` / `supabase/config.jsonc` tabs. The JSONC is
generated at build time with `convertCliConfigTomlToJsonc` from
`@supabase/config`, the same converter `supabase config convert` uses,
so authors only write TOML and the JSONC matches what the CLI would
produce (comments included). Inside `<$CodeTabs>` the JSONC is added as
an extra tab.
- **The format choice sticks.** `ConfigCodeTabs` keeps the selected
format in `localStorage`, so choosing JSONC switches every config
example on the page and on later pages.
- **Config reference.** The `usage` examples on
`/guides/local-development/cli/config` use the same tabs (they were
highlighted as Python before), and the intro mentions `config.jsonc`.
The `remotes.<branch_name>` example now uses `[remotes.staging]`, since
`<branch_name>` isn't a valid TOML key.
- **New guide, "Config file formats"**
(`/guides/local-development/cli/config-formats`): which file wins,
minimum CLI version, `convert` and `validate`, schema declaration and
versioning, and editor setup (VS Code trusted domains, Even Better TOML,
Tombi, SchemaStore).
- **CLI reference.** Adds `supabase-config-convert` and
`supabase-config-validate` to the CLI reference nav.
`cli_v1_commands.yaml` is the generated v3.2.0 reference, identical to
the release bot's update in #53463, so the two PRs don't conflict.
- **Content.** About 60 existing config examples across the guides,
including the Branching configuration page, are tagged
`name=supabase/config.toml`. Branching reads `config.json` and
`config.jsonc` as well, and the Branching configuration page now says
so. Non-Supabase TOML (`pyproject.toml`, `bunfig.toml`) and the v2-era
`[inbucket]` before/after snippet stay TOML-only.
- **Format-neutral prose.** Sentences that described the config as
`config.toml` now say "your config file", naming `supabase/config.toml`
and `supabase/config.jsonc` once per page. TOML section syntax in prose
(`max_frequency` under `[auth.email]`) is written as key paths
(`auth.email.max_frequency`), which read the same in both formats.
Headings that named `config.toml` keep their old anchors. Sentences
about what `supabase init` creates still say `config.toml`.
- **Markdown export for agents.**
`internals/generate-guides-markdown.ts` runs the same transform, so the
`.md` pages served to AI agents include the JSONC example after each
TOML one.
- A test converts every tagged example under `content/`, so a broken
TOML example fails tests instead of the build.

New dependencies for `apps/docs`: `@supabase/config` (^1.8.0) and
`effect` (the same `effect` version Studio pins).

`config convert` and `config validate` ship in CLI v3.2.0, which is now
stable.

## Review instructions

1. Open `/docs/guides/local-development/seeding-your-database` on the
preview. Switch an example to `supabase/config.jsonc` and check the
other examples on the page switch too.
2. Open `/docs/guides/local-development/cli/config` and check the usage
examples open on JSONC.
3. Read `/docs/guides/local-development/cli/config-formats`.
4. Open `/docs/reference/cli/supabase-config-convert` and
`/docs/reference/cli/supabase-config-validate`.

## Self-review

Ran the `review-the-docs` local self-review (content, pipeline, and
component checks) over the 54 changed pages.

- No blockers. Fixed the nits it found: leftover TOML section syntax in
prose (diff engines, declarative schemas, Branching, the common settings
table on Local and hosted projects), a few long or ungrammatical
sentences, and the conversion follow-up steps on Config file formats,
now a list.
- Links, custom anchors, nav wiring, and frontmatter check out.
- The `.md` export on the preview shows each TOML example followed by
its JSONC version.
- `test-the-docs` deferred: the changed fences are config snippets, and
`ConfigFormats.test.ts` already converts every tagged example. No
procedural steps changed apart from the `config convert` and `config
validate` commands on the new page.

## Checklist

Check all before review:

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [x] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
2026-11-20 14:34:59 +00:00
Kody JacksonandClaude Sonnet 5.5 ceae23e199 docs: add cross-links in guides (AI, API, Auth, Database, Functions, deployment) (#53560)
## What

Adds internal cross-links to docs guides

## Testing

- Prettier passes on the changed lines.
- Docs build passes (`pnpm build --filter=docs`).
- Docs link e2e run locally against the production build for every
changed page across this PR

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-18 08:57:10 -06:00
Alexis Aguilar 8a78b7e5be docs: call Edge Functions from Postgres with the secret key (#51990)
Found during my dogfooding project :)

## Problem

Three guides give conflicting guidance on how Postgres should
authenticate when it calls an Edge Function:

- **Securing Edge Functions:** calls from `pg_net` and cron jobs send
the secret key on `apikey`, with `auth: 'secret'` and `verify_jwt =
false`. The Dashboard agrees: the webhook and cron job forms only offer
**Add secret key**.
- **Scheduling Edge Functions:** the only example that stores a key in
Vault sends the publishable key. A request with only the publishable key
passes the `verify_jwt` check, so anyone who has that public key can
call the function.
- **Database Webhooks:** doesn't cover calling an Edge Function or
authenticating to it. Its SQL example writes headers inline, so a
webhook created in a migration puts the secret key in a committed file.

Resolves [DOCS-1458](https://linear.app/supabase/issue/DOCS-1458),
[FDBKIN-19992](https://linear.app/supabase/issue/FDBKIN-19992)

## Solution

All three pages now recommend the secret key for calls from Postgres.

- **Scheduling Edge Functions:** stores and sends the secret key,
explains why the publishable key isn't safe here, and links to the
function-side setup.
- **Database Webhooks:** a new Call an Edge Function section covers the
Supabase Dashboard flow and a migration. The migration reads the key
from Vault in a `security definer` trigger function. The section
explains that the definer is required, because the roles that insert
rows can't read Vault.
- **Securing Edge Functions:** the service-to-service section is now a
two-step setup. It shows how to disable the `verify_jwt` check in
`supabase/config.toml`, with a link to the Authorization headers guide,
and how to use `auth: 'secret'` in the function. It then links to
Database Webhooks and Scheduling Edge Functions.
- **`pg_net` queue:** Database Webhooks and Scheduling Edge Functions
show a caution that any role that can log in to the database can read
the secret key while the request waits, because `pg_net` writes the
decrypted key to `net.http_request_queue` until it sends the request.
Both pages include the caution from a new partial,
`_partials/pg_net_queued_key.mdx`, which links to the troubleshooting
article.

## Verification (`/test-the-docs`)

| Snippet / step | Class | Sandbox | Result | Notes |
| --- | --- | --- | --- | --- |
| Function with `auth: 'secret'` and `verify_jwt = false`, called with
the secret key on `apikey` | runnable-with-setup | Compose runner +
`supabase start` | pass | Returns `200` |
| Same function, called with the publishable key, then no key |
runnable-with-setup | Compose runner + `supabase start` | pass |
Rejected with `INVALID_API_KEY`, then `MISSING_CREDENTIALS` |
| Scheduling Edge Functions: Vault secrets, then `cron.schedule` |
runnable-with-setup | Compose runner + `supabase start` | pass | The
cron run succeeded, and the function returned `200` |
| Database Webhooks: Vault-based trigger function and trigger |
runnable-with-setup | Compose runner + `supabase start` | pass | Inserts
as `postgres` and as `authenticated` both reached the function with the
documented payload |
| Same trigger function as `security invoker`, insert as `authenticated`
| runnable-with-setup | Compose runner + `supabase start` | pass | Fails
with `permission denied for schema vault`, which confirms the page's
explanation |
| Database Webhooks: Dashboard steps | deferred | — | deferred | Needs a
hosted project. Labels confirmed in the Studio source. |

**Tier A path:** Vault secrets → `pg_cron` job → `pg_net` request → Edge
Function with `auth: 'secret'` returns `200`.

**Environment:** OrbStack; compose sandbox (`sandbox/run.sh`); fences
in-container only. Two deviations from the stock sandbox, neither
committed:

- The sandbox pins Supabase CLI v2.39.2, which predates `sb_secret_` and
`sb_publishable_` keys. The run used v2.121.0.
- The `dind` service doesn't mount `/work`, so local functions fail with
`failed to determine entrypoint`. The function file was copied into the
DinD filesystem.

`project_url` pointed at the local API gateway, because the database
container can't reach the runner's `127.0.0.1`.

## Preview links

- [Database
Webhooks](https://docs-git-alexisa-docs-1458-supabase.vercel.app/docs/guides/database/webhooks)
- [Scheduling Edge
Functions](https://docs-git-alexisa-docs-1458-supabase.vercel.app/docs/guides/functions/schedule-functions)
- [Securing Edge
Functions](https://docs-git-alexisa-docs-1458-supabase.vercel.app/docs/guides/functions/auth)


## Post-merge

> [!IMPORTANT]
> After this PR merges, post the following comment on
[FDBKIN-19992](https://linear.app/supabase/issue/FDBKIN-19992) and close
it:
>
> The "Missing required headers" error happens when the webhook doesn't
send an auth header to the Edge Function. Database Webhooks send only
the headers you configure. [Database Webhooks → Call an Edge
Function](https://supabase.com/docs/guides/database/webhooks#call-an-edge-function)
shows how to add the secret key, either in the Dashboard with **Add
secret key** or in a migration that reads the key from Vault. [Securing
Edge
Functions](https://supabase.com/docs/guides/functions/auth#service-to-service-calls)
covers the function side: disable `verify_jwt` and use `auth: 'secret'`.
2026-10-22 19:19:42 +00:00
Miranda Limonczenko 63c165311e docs(functions): act on the Edge Function auth eval findings (#50886)
Closes DOCS-1318

## Problem

An agent was asked to build an Edge Function returning the order history
for whoever is signed in and calling it. Three runs, all correct: each
one used the page's `auth: 'user'` pattern and read through the
caller-scoped client. The eval scores 7 of 7, including the guide-read
check.

These are the gaps that showed up around it.

| Finding | What the page does now | Why it matters |
| --- | --- | --- |
| Two clients, no guidance | The first example destructures `supabase`
and `supabaseAdmin` together and labels the second "bypasses RLS
(service role)" | A reader skimming for the client to use sees two, and
one of them is wrong for that section |
| No consequence named | "Bypasses RLS" is the strongest phrasing
anywhere | A handler querying a shared table through the privileged
client without a filter returns every user's rows. The page never said
so |
| `verify_jwt` as a value to set | Appears six times, five of them as
something to change | Switching it off to clear a 401 in development is
a reported failure. The page never said the default is the safe one |


## Solution

- **Say which client to reach for**, in the section where both are
handed over.
- **Name the outcome** in a `danger` admonition: a handler that queries
a shared table through `ctx.supabaseAdmin` without filtering by the
caller's ID returns every user's rows.
- **Frame `verify_jwt = true` as the default to leave alone** on
user-facing functions, and say what turning it off costs.
- **Say every project starts with a secret key named `default`.**

**Not asserted here:** the eval is not re-run. It was already at 7 of 7,
so there is no headroom to measure an improvement. A candidate new check
is proposed on DOCS-1318.

## Preview links

| Site | Live | Preview | Search for |
| ---- | ---- | ------- | ---------- |
| Docs |
[/docs/guides/functions/auth](https://supabase.com/docs/guides/functions/auth)
|
[/docs/guides/functions/auth](https://docs-git-docs-functions-auth-eval-findings-supabase.vercel.app/docs/guides/functions/auth)
| returns every user's rows |

## Review instructions

1. Open the live and preview links side-by-side.
2. Read Authenticated user calls on the preview. See a paragraph on
choosing between `ctx.supabase` and `ctx.supabaseAdmin`, then a `danger`
admonition naming the every-user's-rows outcome.
3. See the same section say to leave `verify_jwt = true` on for
user-facing functions.
4. Read the note under Service-to-service calls. See it mention the
`default` secret key.

## Checklist

Check all before review:

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [x] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which references
[WORD_LIST](https://github.com/supabase/supabase/blob/master/apps/docs/WORD_LIST.md)
and the docs
[CONTRIBUTING](https://github.com/supabase/supabase/blob/master/apps/docs/CONTRIBUTING.md)
guide


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
* Clarified that `secret` and `publishable` authentication modes accept
the `default` key, and documented how default, wildcard, and additional
keys are handled.
* Explained that JWT verification is enabled by default and that
disabling it leaves `withSupabase` as the only caller-verification step.
* Added guidance that admin queries bypass row-level security and should
be scoped to the caller when accessing shared tables.
* Clarified that service-to-service authentication with `secret`
validates only the `default` key.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-10-05 15:14:27 -07:00
Miranda Limonczenko 259dbe11f1 docs/functions auth structure (#50885)
## Problem

Restructure the topic based off of the PRed Style Guide.

## Solution

- **Group the seven sections into three.** A concept opener, `Choose an
auth mode`, holds the mode table. `Secure your function` holds the six
patterns. `Environment variables` stays last as the fact group.
- **Add an intro outline** linking the three groups, and a group
introduction for the patterns.
- **Move the Authorization headers link below the mode table**, so the
sentence that introduces the table sits next to it.
- **Correct the content listing entry** to match the page's own title.

**Anchors:** every heading text is unchanged. Five headings move from
`##` to `###`, which preserves the slug. The in-page link to
`#external-webhooks` and the two existing redirects in
`apps/www/lib/redirects.js` all still resolve. Verified by grepping the
repo for `functions/auth#` before and after.


## Preview links

| Site | Live | Preview | Search for |
| ---- | ---- | ------- | ---------- |
| Docs |
[/docs/guides/functions/auth](https://supabase.com/docs/guides/functions/auth)
|
[/docs/guides/functions/auth](https://docs-git-docs-functions-auth-structure-supabase.vercel.app/docs/guides/functions/auth)
| Choose an auth mode |
| Docs |
[/docs/guides/functions](https://supabase.com/docs/guides/functions) |
[/docs/guides/functions](https://docs-git-docs-functions-auth-structure-supabase.vercel.app/docs/guides/functions)
| Securing Edge Functions |

## Review instructions

1. Open the live and preview links side-by-side.
2. See three top-level entries in the preview's table of contents, with
six nested under `Secure your function`.
3. Load `/docs/guides/functions/auth#external-webhooks` on the preview.
See the page jump to that section.
4. Open the second preview link. See the listing card read "Securing
Edge Functions" rather than "With supabase-js".

## Checklist

Check all before review:

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [x] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which references
[WORD_LIST](https://github.com/supabase/supabase/blob/master/apps/docs/WORD_LIST.md)
and the docs
[CONTRIBUTING](https://github.com/supabase/supabase/blob/master/apps/docs/CONTRIBUTING.md)
guide


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
* Reorganized the authentication guide with a table of contents and
clearer sections on choosing an auth mode and securing a function.
* Clarified that the guide covers all supported auth modes, combining
modes, and custom error responses.
* Renamed the guide listing to “Securing Edge Functions” and updated its
description to mention declaring accepted credentials.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-10-05 15:14:27 -07:00
Miranda Limonczenko 19188ece58 docs(functions): style pass on the Edge Function auth guide (#50884)
Apply the docs style guide to Securing Edge Functions. Inline changes only.

- Open the page with a value statement
- Split the sentences that ran past the 26-word aim, and keep one
  relationship per sentence
- Replace dash-bounded asides with separate sentences
- Lift `(the default)` out of parentheses so it reads as a claim
- Name the section instead of "above" and "the sections below"
- Introduce the mode table in the sentence before it
- Raise the `auth: 'none'` admonition to `danger`, and state it in the
  positive form
- Stop restating that admonition in the Public functions section
- Spell out Row Level Security, and name `@supabase/server` rather than
  "the SDK"
- Use Supabase Dashboard and Supabase Platform consistently
- Use "function" rather than "endpoint", and spell out "db"
- Link `@supabase/server` once, and name it as a GitHub destination
- Rewrite the Secret keys alt text to describe both rows, the column
  headers, and the masked key format
2026-09-30 14:36:05 -07:00
Katerina Skroumpelou 2013ebf417 docs: drop alpha labels and pin server and middleware imports to a major (#51031)
## Problem

`@supabase/middleware` ships as 1.0.0. The docs still label the
`pipeline` entry form of `withSupabase` alpha, and several snippets
import `npm:@supabase/server` and `npm:@supabase/middleware` with no
version or with a `^0.5.0` pin. A snippet without a version leaves
readers and tools to guess one, and a guessed version fails on deploy.

## Solution

- Removes the alpha wording from the middleware reference intro and
usage examples, the server frameworks partial, and the Bring your own
MCP guide. The `@supabase/server` 1.6.0 floor stays.
- Pins every `npm:@supabase/server` and `npm:@supabase/middleware`
import in the guides to a major range, `@1`, following the
`npm:@supabase/supabase-js@2` convention in Managing dependencies.
- Bumps the authenticated-mcp-server example to middleware `^1.0.0` and
server `^1.9.0`.

~~Blocked by supabase/middleware#49. The `@1` range resolves once 1.0.0
is on npm.~~




<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
* Updated authentication, API key, and MCP examples to use versioned
Supabase server and middleware packages.
* Clarified that pipeline and nested composition behave the same, and
that both require `@supabase/server` 1.6.0 or later.
* Removed alpha-status labels from `withSupabase` guidance while
retaining the 1.6.0 minimum-version requirement.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-30 17:27:44 +03:00
Illia Basalaiev 37a95fd912 docs: update edge functions limits and examples across guides (#49899) 2026-09-02 20:27:02 +02:00
Tomás PozoandChris Chinchilla 9d46004210 docs: rewrite Securing Edge Functions guide around @supabase/server (#45959)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Docs update.

## What is the current behavior?

The "Securing Edge Functions" guide (`/docs/guides/functions/auth`)
opens with two conceptual sections — "Understanding authorization
headers" and "The `verify_jwt` platform check" — followed by a "Common
auth patterns" section that re-implements the same four use cases twice:
once without an SDK using `Deno.serve` + manual `createClient` + manual
`Authorization` header forwarding, and again using `@supabase/server`.
The recommended path is buried below background reading and a
legacy-style implementation.

Linear: COM-235.

## What is the new behavior?

The guide now leads with practical how-tos built on `@supabase/server`:

- Authenticated user calls (`auth: 'user'`)
- Service-to-service calls (`auth: 'secret'`)
- Public functions (`auth: 'none'`)
- External webhooks (`auth: 'none'` + signature verification)
- Combining modes
- Custom error responses
- Environment variables

The two conceptual sections are extracted into a new sibling page at
`/docs/guides/functions/auth-headers` ("Authorization headers"), linked
from the top of the how-to page and added to the side nav between
"Securing your functions" and "Legacy JWT secret".

The legacy SDK-less examples are removed. The mode table uses the
unnamed forms (`'secret'`, `'publishable'`), and a note in the
service-to-service section introduces the `'secret:<name>'` /
`'publishable:<name>'` syntax for callers that want to scope to a
specific named key.

## Additional context

Each section preserves the "who calls this and why" framing from the
original (cron jobs, workers, and `pg_net` for service-to-service;
`supabase.functions.invoke` for authenticated user calls; signed webhook
providers for external webhooks).

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Documentation**
* Added a new guide explaining Edge Functions authentication headers,
JWT validation, and API key handling
* Redesigned core authentication guide to focus on the primary wrapper
approach with clearer examples and common scenarios
* Improved navigation and added redirects to make authentication docs
easier to find and access

<!-- review_stack_entry_start -->

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/45959?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)

<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>
2026-05-18 08:43:23 -05:00
Kalleby Santos bcf54b0eaa fix: using 'authMode' instead of 'authType' (#45626)
## What kind of change does this PR introduce?

docs update

## What is the current behavior?

Current docs using `authType`

## What is the new behavior?

Using new `authMode` syntax
2026-05-06 09:36:29 +00:00
Kalleby Santos 937897a172 fix: applying '@supabase/server' sdk api changes (#45607) 2026-05-06 07:40:30 +00:00
Tomás Pozo 22e3ffc246 docs: fix anchor duplication (#45548)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Small bug on https://supabase.com/docs/guides/functions/auth that shows
2 anchors with the same heading active.

## What is the current behavior?

Currently we show case 2 different implementations (raw and with server
sdk) in separate sections. Intentionally we want to show the same
heading under each section so is a 1-1 comparison. The issue is that
anchor links on the second section always point to the first section,
and on the navigation bar, both show as active.

## What is the new behavior?

Fix headings with proper custom anchors.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
* Enhanced authentication guide documentation with improved section
navigation anchors for better cross-reference linking and accessibility
within guides.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-05-04 20:55:52 -05:00
75aa1b9e40 docs: update edge functions integration guides with new server package (#45058)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Update our documentation about securing Edge Functions using the new
supabase/server sdk.

## What is the current behavior?

Current documentation shows how to do a manual validation of the
incoming JWT. The new sdk abstracts that logic and provides a new DX.

## What is the new behavior?

None.

## Additional context

None.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Documentation**
* Updated Edge Functions authentication guide with explicit two-layer
auth patterns.
* Clarified header usage and distinction between user JWTs and API keys.
  * Documented platform JWT verification behavior and 401 handling.
* Added examples for user-authenticated calls, service-to-service calls,
public endpoints, and webhook handlers.
* Added server-side SDK patterns with configurable allow modes and
customizable auth responses.
  * Expanded environment variable reference for auth configuration.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Kalleby Santos <kalleby_santos@hotmail.com>
Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>
Co-authored-by: Chris Chinchilla <chris@chrischinchilla.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-04-27 11:14:21 +02:00
ec6e5ee05f docs: Update auth.mdx to include important note about local testing (#32946)
* Update auth.mdx to include important note about local testing

* Apply suggestions from code review

---------

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>
2026-01-13 07:15:39 +00:00
Kalleby SantosandChris Chinchilla 037e5f90a5 docs: improvements on securing Edge Functions guide (#41727)
* stamp: using CodeSample to dynamic load jwt examples

* stamp: lint

* stamp: using latest 'jose' lib on jwt examples

* stamp: update 'jose' lib link

* Update apps/docs/content/guides/functions/auth.mdx

---------

Co-authored-by: Chris Chinchilla <chris@chrischinchilla.com>
2026-01-07 14:26:40 +00:00
0a8e264102 feat(docs): edge functions JWT Signing Keys guide (#41444)
* feat: edge functions legacy jwt auth guide

* stamp: adding `verify_jwt` disclaimer

* stamp: manual verify jwt example

* stamp: improving example

* stamp: improve supabase auth example

* feat: adding signing keys to jwt templates

* stamp: cleaning

* stamp: applying mdx-lint

* stamp: format

* stamp: applying ai suggestions

* stamp: improving jwt lib example

* stamp: cleaning

* stamp: typo

* stamp: applying suggestions

* stamp: applying suggestions

* stamp: applying improvements suggestions

* stamp: ponctuation typo

* stamp: ponctuation typo

* Update apps/docs/content/guides/functions/auth.mdx

* Update apps/docs/content/guides/functions/auth.mdx

* Apply suggestions from code review

* Update apps/docs/content/guides/functions/auth.mdx

* Update apps/docs/content/guides/functions/auth.mdx

* Update apps/docs/content/guides/functions/auth.mdx

* Update apps/docs/content/guides/functions/auth.mdx

---------

Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>
Co-authored-by: Chris Chinchilla <chris@chrischinchilla.com>
2026-01-05 14:29:02 +01:00
Chris Chinchilla 336788b120 docs: Correct key usage in edge function docs (#38545)
Correct keys
2025-09-09 18:06:33 +10:00
Stojan DimitrovskiandChris Chinchilla 93ba2a312c docs: indicate publishable key instead of anon in many examples (#37411)
* docs: indicate publishable key instead of anon in many examples

* replace your-anon-key to string indicating publishable or anon

* fix your_...

* apply suggestion from @ChrisChinchilla

Co-authored-by: Chris Chinchilla <chris@chrischinchilla.com>

* Update keys in code examples

* Prettier fix

* Update apps/docs/content/guides/functions/schedule-functions.mdx

---------

Co-authored-by: Chris Chinchilla <chris@chrischinchilla.com>
2025-08-18 13:47:48 +02:00
Lydia HallieandCharis a26c01217d Update Edge Functions docs (#36798)
* Update Environment Variables docs

* Update Dependencies docs

* Add Function Configuration d ocs

* Add custom Configuration section in Navigation

* Add Error Handling section

* Add new HTTP Methods section

* Update Deno 2 Guide

* Update nav

* Rm deno2 nav

* Update Deploy section

* Update CI/CD section

* Update Logging

* Update Testing

* Update Local Debugging

* Update Troubleshooting

* Update Nav

* Update CLI Quickstart

* Update Dashboard Quickstart

* Update Development Environment

* Update Nav

* Fix links

* Update apps/docs/content/guides/functions/quickstart-dashboard.mdx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* Update apps/docs/content/guides/functions/development-environment.mdx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* Update apps/docs/content/guides/functions/development-environment.mdx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* Update apps/docs/content/guides/functions/quickstart.mdx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* Use $CodeSample for multi-root example

* Use tocVideo instead of video embed

* Rm typo

* Switch Quickstart ordering

* Rephrase Docker requirement for deployment

* Add Project Structure section

* style: fix docs lint issues

* Update Regional Invocations

* Update Error Handing

* Fix linting

* Fixes

* Remove duplicate sections

* Update Auth integration

* Update Storage

* Update Database/Postgres

* Update Nav

* Update Background Tasks

* Update Ephemeral Storage

* Update Websockets

* Update Routing

* Update wasm

* Update AI models

* Fix linting issues

* Update apps/docs/content/guides/functions/ai-models.mdx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* Update apps/docs/content/guides/functions/ai-models.mdx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* Update apps/docs/content/guides/functions/ai-models.mdx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* Update apps/docs/content/guides/functions/storage-caching.mdx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* Update apps/docs/content/guides/functions/websockets.mdx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* Update apps/docs/content/guides/functions/websockets.mdx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* Update apps/docs/content/guides/functions/ai-models.mdx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* Rm unnecessary lines

* Rm wrong example

* Fix typo

* Rm deno2

* Move CICD to deployment and rename routing

* Fix whitespace

* rm unnecessary spelling

---------

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
2025-07-10 14:18:01 +00:00
Kevin Kuhl 82715efc25 Correct auth.mdx examples (#34746) 2025-06-12 20:55:24 +00:00
Lakshan Perera 3c390c7891 chore: Use npm specifier instead of jsr for supabase-js imports (#36291)
chore: update examples to use npm specifier instead of jsr
2025-06-09 22:36:48 -04:00
Filippo BrigatiandCharis 83947491f3 Add user token initialization in auth.mdx (#32997)
* Add user token in auth.mdx

I added the part of the code responsible for initializing the Supabase client with the token passed via the header, to ensure compliance with RLS (Row-Level Security).

As shown on this page:
https://github.com/supabase/supabase/blob/master/examples/edge-functions/supabase/functions/select-from-table-with-auth-rls/index.ts

Otherwise authentication will not be completed.

* make js compatible

---------

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
2025-06-02 16:02:49 -04:00
Rodrigo Mansueli f233c78794 Chore: update also last example on the page (#32809) 2025-01-16 06:28:41 +11:00
Rodrigo Mansueli 3e94bc483c Chore: update edge function example (#32808)
Update auth.mdx
2025-01-15 15:20:43 -03:00
Charis f4779d4844 refactor: migrate guides to app router (#23101)
Migrate guides to App Router.
2024-07-03 10:25:06 -04:00
Thor 雷神 Schaeff 0dbb5e5225 docs: update deno deps to jsr. (#27766)
docs: update deno desp to jsr.
2024-07-03 18:06:55 +08:00
grumpy-minerandCharis 5da928a0a1 Update auth.mdx - update fetching the user code example (#26614)
Update auth.mdx

Add constant authHeader in code example of Fetching the user

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
2024-05-21 23:33:44 +00:00
ec86bbc4fe feat: new auth ia (#22812)
Co-authored-by: Kang Ming <kang.ming1996@gmail.com>
Co-authored-by: Joel Lee <lee.yi.jie.joel@gmail.com>
2024-05-07 20:15:06 +00:00
Simon HaandCharis 597c554e7a [WIP] 20771/fix auth get user for edge functions (#23155)
* docs: fix RPC sql example

* docs: fix auth.getUser() calls to use auth.getUser(jwt)

- add lines to get token before calling auth.getUser() as session is not
set after setting authHeader in client

* Apply suggestions from code review

---------

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
2024-04-30 20:34:58 +00:00
Charis 42723d8232 refactor: move ai, realtime, functions, remaining auth docs to content directory (#21259) 2024-02-14 17:39:05 +00:00