Commit Graph
23 Commits
Author SHA1 Message Date
Miranda Limonczenko 36749659e6 docs(functions): answer the recurring secrets questions from reader feedback (#50422)
Five reports on this page, four of them the same confusion: which .env file
does what.

Where local values come from is a new section listing the files that feed a
local environment: supabase/functions/.env, a file you name yourself, the root
.env that config.toml reads through env(), and [edge_runtime.secrets]. It says
a value in one is not a value in the other. That is what CLI-818 asked for in
as many words, the duplication FDBKIN-11884 complains about, and the config
route FDBKIN-12716 raises. It sits with the other reference section rather than
inside the local procedure, because it answers what the parts are rather than
how to do something.

Accessing environment variables splits into an Edge Function and a Deno script
you run yourself, where neither env file applies. Deno.env.get needs
--allow-env, so both commands pass it; without the flag the script prompts, and
fails outright when nothing is there to answer. FDBKIN-7937.

Production secrets now states who can set one, and the reserved prefix.

Also calls Deno.env.get a method rather than a handler, which is what it is.
The wording came in with the style pass at the bottom of the stack; fixing it
here avoids restacking four branches for one word.

Two claims from the source reports are deliberately not here.

FDBKIN-34962 reports that adding a secret requires OWNER. The access control
matrix in guides/platform/access-control.mdx says Owner or Administrator can
create and delete, and Developer can view. The reporter found their version by
external searching, so the page states what our own matrix says.

supabase/agent-skills#452 reports that a secret value cannot be recovered after
saving. SecretResponse_Output in the Management API spec returns value as a
required field, and the Dashboard renders it, so that does not hold up from
what I can check here. Left out rather than guessed at; the issue stays open.

The reserved prefix is not a third-party host restriction as
supabase/agent-skills#553 frames it. CreateSecretBody carries
pattern ^(?!SUPABASE_).*, AddNewSecretForm.tsx:42 rejects the same, and the CLI
filters SUPABASE_-prefixed names out of the local function environment. It is
ours, and the page says so.
2026-09-18 16:09:15 -07:00
Miranda Limonczenko 06aafbae4b docs(functions): give local secrets a procedure that produces a working key (#50420)
The Managing secrets guide is the only place that tells you where a local
secret has to sit for the Edge Function runtime to load it. Neither the
supabase agent skill nor Supacademy covers it.

The page named supabase/functions/.env once, in prose, and never had the reader
create it. The eval in supabase/evals#285 reproduces what that produces: across
three runs on codex-gpt-5.6-luna-no-skills, every run built a function reading
its key from the environment, started the stack, and answered missing_api_key.
Two of the three wrote supabase/functions/.env.example and stopped, which is a
template with the variable name in it rather than the file the runtime reads.

Local secrets is now a five-step procedure that creates the file with a working
value, ignores it, creates the function that reads the key, starts the stack,
and calls the function to confirm. That last step is the one that tells the
reader whether it worked. The function is created before the stack starts, so a
reader following the steps literally from a fresh project has something to call.

The gitignore instruction moved out of its admonition and into step 2, carrying
its consequence with it. It's an instruction the reader has to follow, so it
belongs in the procedure rather than beside it.

Recovery for a variable the function can't see gets its own section rather than
trailing the procedure. "I set it and the function cannot read it" is the most
repeated shape in the feedback on this page, and as loose sentences mid-section
it had no entry in the table of contents.
2026-09-18 16:02:48 -07:00
Miranda Limonczenko 7012ba4a55 docs(functions): regroup the secrets guide by information type (#50419)
Moves and heading levels only. No claims changed.

Studio renders a Docs button at
apps/studio/pages/project/[ref]/functions/secrets.tsx:43 pointing at
#using-the-cli, but "Using the CLI" was bold text rather than a heading, so the
anchor had no target and the button dropped the reader at the top of the page.
It and "Using the Dashboard" are now real headings, which repairs it.

Local secrets and Production secrets were h3 under "Accessing environment
variables", but neither is about accessing one. Both are now h2 siblings, and
the reference list moved to the end, so the page runs procedures first and facts
last.

Sections are ordered by what the reader is doing, not by subject: set a secret
locally, read it in code, then set it in production. "Accessing environment
variables" sat after production, which put the reading step after the shipping
step.

Local secrets held a two-item list of the loading mechanisms, which is a fact
sitting inside a procedure. It is now the section's opening sentence, where a
one-line fact can qualify the procedure without interrupting it.

Every existing heading text is unchanged, so #default-secrets, #local-secrets,
#production-secrets and #accessing-environment-variables all still resolve.

Added a value statement opener, and an outcome after the production procedure.
No intro outline: the page is short and its headings already scan.

The frontmatter title was title case. Renaming it to sentence case moves a
navigation label and a search entry, so the nav entry and the three pages that
used the old title as link text change with it. The slug is untouched.
2026-09-18 15:55:32 -07:00
Miranda Limonczenko 82e9f6fb0e docs(functions): tighten the voice in the secrets guide (#50418)
Style only. No heading moves and no claim changes.

The page carried the same caution admonition twice, word for word, and
explained the local .env loading rules twice more: once as a list of the two
mechanisms, then again as a pair of serve commands with the same prose around
them. Both copies are gone, along with the trailing line about managing
different environments that restated the --env-file bullet.

The rest is voice. First person became second, future tense became present,
and "allows you to" became a sentence with the reader as its subject. SB_REGION
and SB_EXECUTION_ID had lost words. The two NEVER shouts became bold, per the
emphasis rule.

The alt text named the topic the heading already names. It now describes the
Key and Value fields, the reveal and remove controls, and the Add another and
Save buttons, which is what a reader who can't see the screenshot needs.

Dropped the item count ahead of the local loading list, and made that list
unordered, because the two mechanisms are alternatives rather than steps.
2026-09-18 13:45:30 -07:00
Wen Bo Xie dfa3a860c3 fix: update edge functions jwks endpoint in docs (#45402) 2026-04-30 11:05:07 +01:00
Chris ChinchillaandKalleby Santos b6dba956ef docs: Functions Key changes (#45224)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

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

* **Documentation**
* Replaced legacy "Anon"/"Service Role" key terminology with
"Publishable Keys" and "Secret Keys" across Edge Functions guides
* Updated authentication examples and request headers (client-side vs
server-side) to reflect publishable/secret key usage
* Standardized environment-variable examples to use parsed secret-key
maps with a selectable default
* Removed guidance for bypassing JWT verification via the deprecated CLI
flag
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Kalleby Santos <kalleby_santos@hotmail.com>
2026-04-29 11:12:54 +00:00
Tomás Pozo 5c744a2c31 docs(functions): update Edge Functions secrets docs for new API keys (#45357)
## Summary
- Add `SUPABASE_JWKS` to the default secrets list, noting it matches the
public JWKS endpoint
- Update the example in "Accessing environment variables" to use
`SUPABASE_PUBLISHABLE_KEYS` / `SUPABASE_SECRET_KEYS` (matches the
pattern in `functions/auth.mdx`)
- Add an inline note that `'default'` can be swapped for another key
name

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

## Summary by CodeRabbit

## Release Notes

* **Documentation**
  * Updated Edge Functions secrets guide with improved code examples.
* Introduced `SUPABASE_JWKS` environment variable for JWT verification.
* Enhanced examples demonstrating environment variable configuration and
Supabase client initialization.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-29 08:30:22 +02:00
Kalleby Santos 60aa9efe6d feat: adding new api keys to default secrets (#45103)
## What kind of change does this PR introduce?

docs update

## What is the current behavior?

Functions default secrets page doesn't mention new api keys secrets 

## What is the new behavior?

Adding the new api keys secrets

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

## Summary by CodeRabbit

## Documentation
* Updated Edge Functions secrets guide with newly documented environment
variables including `SUPABASE_DB_URL`, `SUPABASE_PUBLISHABLE_KEYS`, and
`SUPABASE_SECRET_KEYS` with usage guidance.
* Reorganized secrets documentation for improved clarity.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-27 08:41:04 +02:00
Prashant SridharanandAlan Daniel 14d36e9480 Bolt webinar cta page (#43107)
## 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?

New Go landing page for the upcoming Bolt webinar. This is where we will
direct customers who want to learn more to go to request a meeting.

---------

Co-authored-by: Alan Daniel <stylesshjs@gmail.com>
2026-02-24 10:50:54 +00:00
Jeremias Menichelli f6ec43a9ed [DOCS-454] fix(Docs): Fix images from causing CLS on pages (#43026) 2026-02-23 19:02:31 +01:00
Danny White 19cf4bb4bf feat(studio): consolidate settings phase 2 (#37612)
* new slugs

* remove symlinks

* rabbit
2026-01-26 15:41:05 +08:00
Lakshan Perera 757332fec8 docs: add default environment variables available in hosted enviroment (#38666) 2025-09-16 17:51:58 +02:00
CharisandChris Chinchilla 47705a8968 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>
2025-09-09 12:54:33 +00:00
Chris Chinchilla 2e7a98f998 docs: Fix Key changes for functions (#38372)
Fix Key changes for functions
2025-09-09 06:27:44 +00: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
Charis a62ae515b1 docs: add instructions for using management api as alternative to dashboard ui (#36676) 2025-06-26 09:10:10 -04:00
Zander-Davidson c8dbd58e25 Add missing word in secrets.mdx (#36261) 2025-06-09 14:18:13 +00:00
Terry SuttonandIvan Vasilov dc137679be Edge functions secrets updates (#31329)
* Rename secrets to env vars, add inline form

* Add multiple

* Fix adding multiple

* Change name back

* Sm update

* Add docs for secrets management

* Fix file paths

* Prettier

* Fix image paths

* Images

* clean up

* Fix form submit

* Minor fixes.

* Remove console logs.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-02-25 10:47:59 -03:30
Charis a820c56ed0 chore: docs linting (#33574) 2025-02-21 14:13:00 -05:00
hallidayo 307bdf3118 fix: deno env example name (#27966)
* deno env example name

* prettier fix
2024-07-14 12:32:13 +02: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
Charis 42723d8232 refactor: move ai, realtime, functions, remaining auth docs to content directory (#21259) 2024-02-14 17:39:05 +00:00