Commit Graph

37 Commits

Author SHA1 Message Date
Chris Chinchilla d8bd6b047c docs: Examples Key changes (#45170)
## 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**
* Updated examples and guides to use Supabase publishable (client) keys
instead of anon keys for client-side usage across frameworks and
platforms.
* Renamed environment variable examples and .env templates to reflect
publishable key naming.
* Adjusted sample requests and client-init examples to send/use the
publishable key via the apikey header where applicable.
* Updated references from service_role to secret for server-side
credential guidance.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: fadymak <fady@fadymak.com>
2026-05-04 12:58:16 +02:00
Laurence Isla 08e9cdde5e docs: data api docs functions (#44412)
## 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?

Replaces "stored procedures" with "functions" for everything related to
the Data API.

## Additional context

It's not accurate to call database functions "stored procedures". It may
have been that way before Postgres 11, but now it causes confusion
because PostgREST allows functions and not stored procedures.

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

* **Documentation**
* Standardized terminology across docs, SDK guides, CLI/config specs,
examples, UI, and config comments to use "database functions" instead of
"stored procedures".
* Updated API docs, CLI/config descriptions, Studio UI labels, help
text, empty-state and navigation copy, RPC documentation, and example
text for consistency.
* Adjusted explanatory text and error/help messages to reflect the
revised terminology.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-21 11:54:27 +10:00
Katerina Skroumpelou a7563e9fe6 docs(examples): use latest v2 of supabase-js and remove lock files (#44704)
* Use latest 2.x version of `@supabase/supabase-js` in all examples
* Use `latest` version of `@supabase/ssr` in all examples
* Remove lock files from examples
* Add examples lock files in .gitignore

The rationale is:
- Lock files are not actively maintained/updated (or the versions in the
package.json files for that matter)
- They pin an arbitrary version (from the end-user perspective)
- Removes the need to manually update the versions and reinstall
- Consistency

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

## Summary by CodeRabbit

## Release Notes

* **Chores**
* Broadened Supabase SDK dependency version constraints across example
projects for greater flexibility with compatible updates
  * Updated some SSR package dependencies to track latest releases
* Added gitignore rules for dependency lock files in example directories

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-14 09:24:46 +03:00
Katerina Skroumpelou 41f9ddd70c docs: update setAll callbacks to accept cache headers second argument (#44240)
## What

Updates all `setAll` cookie handler implementations across docs and
examples to accept the new `headers` second argument introduced in
`@supabase/ssr` v0.10.0
([supabase/ssr#176](https://github.com/supabase/ssr/pull/176)).

## Why

`@supabase/ssr` v0.10.0 introduced a breaking change: `setAll` now
receives a required second argument `headers: Record<string, string>`
alongside the cookies array. When a token refresh occurs, the library
passes cache headers (`Cache-Control`, `Expires`, `Pragma`) that must be
applied to the HTTP response to prevent CDN caching of auth responses.

Because TypeScript allows functions with fewer parameters to satisfy a
type expecting more, existing `setAll` implementations do not produce a
type error when the second argument is omitted. Users who copy an
outdated snippet will silently miss the CDN protection.

Root cause and context:
[supabase/supabase-js#1682](https://github.com/supabase/supabase-js/issues/1682)

## Changes

**Proxy/middleware contexts** (where token refreshes happen) now apply
the cache headers to their response:
- Next.js proxy files: `supabaseResponse.headers.set(key, value)`
- SvelteKit hooks: `event.setHeaders(headers)`
- Hono middleware: `c.header(key, value)`
- Pages Router (Express-style): `ctx.res.setHeader(key, value)`
- Remix/React Router loaders and actions: applied to response headers
(outer `headers` variable renamed to `responseHeaders` to avoid naming
conflict with the new param)

**Server Component and API route contexts** (no response object
available) accept `_headers` without applying them.

## Files updated

- `apps/docs/content/guides/auth/server-side/creating-a-client.mdx`
(inline Astro, Remix, React Router, Express snippets)
- `apps/docs/content/_partials/oauth_pkce_flow.mdx`
- `apps/docs/content/guides/auth/oauth-server/getting-started.mdx`
- `apps/docs/content/guides/auth/passwords.mdx`
-
`apps/docs/content/troubleshooting/how-to-migrate-from-supabase-auth-helpers-to-ssr-package-5NRunM.mdx`
- `examples/auth/nextjs/`, `examples/auth/nextjs-full/` (proxy + server)
- `examples/auth/sveltekit/`, `examples/auth/sveltekit-full/`
- `examples/auth/hono/`, `examples/auth/hono-full/`
- `examples/user-management/nextjs-user-management/` (proxy + server)
- `examples/user-management/sveltekit-user-management/`
- `examples/realtime/nextjs-authorization-demo/` (proxy + server)
- `examples/realtime/nextjs-auth-presence/` (pages router)
- `examples/prompts/nextjs-supabase-auth.md`
2026-03-30 16:08:29 +03:00
Ivan Vasilov d07e78a616 chore: Run prettier on examples folder (#43851)
This PR runs `prettier` on the `examples` folder.

Depends on https://github.com/supabase/supabase/pull/43849.
2026-03-18 10:51:10 +01:00
Chris Chinchilla 579357089b docs: Update auth-helpers usage from examples (#43345)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES
2026-03-09 10:26:16 +01:00
Chris Chinchilla ae727a4659 docs: update supabase docs for nextjs 16 proxyts change (#40555)
* Quickstart next 16 update

* Fix paths and env vars

* docs: refactor nextjs server-side auth to use Proxy instead of middleware

* docs: refactor nextjs server-side auth to match proxy

* docs: refactor nextjs example to match Proxy

* docs: refactor nextjs auth AI prompt to match Proxy

* docs: refactor nextjs sentry telemetry integration to match Proxy

* examples: update nextjs realtime example to match middleware

* docs: refactoring guides to use nextjs proxy

* examples: update nextjs-full example to match Next16 template

* example: update nextjs-user-management to match nextjs 16

* docs: refactoring nextjs user-management tutorial to use typescript only

* docs: refactoring nextjs quickstart, removing step 4

since this step is already included on `with-supabase` template, we can
just remove this redundant step

* docs: auth-helpers nextjs pages, Nextjs16 proxy disclaimer

* stamp: lint

* stamp: revert 'NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY'

* stamp: nextjs examples, revert to use cookie options

* fix(docs): typo

* docs: updating nextjs-auth troubleshoot guide to match proxy

* Update apps/docs/content/guides/getting-started/quickstarts/nextjs.mdx

* Revert auth-helpers changes

* Revert auth-helpers content

* Apply suggestions from code review

* Update apps/docs/content/troubleshooting/how-do-you-troubleshoot-nextjs---supabase-auth-issues-riMCZV.mdx

* Update apps/docs/content/troubleshooting/how-do-you-troubleshoot-nextjs---supabase-auth-issues-riMCZV.mdx

* Update apps/docs/content/troubleshooting/how-do-you-troubleshoot-nextjs---supabase-auth-issues-riMCZV.mdx

* Update apps/docs/content/troubleshooting/how-do-you-troubleshoot-nextjs---supabase-auth-issues-riMCZV.mdx

* Apply suggestions from code review

* Prettier

---------

Co-authored-by: kallebysantos <kalleby_santos@hotmail.com>
2025-12-01 16:53:12 +01:00
Filipe Cabaço 2b3abd79f5 realtime: improve getting started guide (#38562)
---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-09-17 14:31:58 +01:00
Raúl Barroso 29ee6a2992 style: use GitHub's right product name (#38099)
* style: use GitHub's right product name

* fix: use correct kotlin provider
2025-08-22 13:43:47 +02:00
Stojan Dimitrovski 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
Beng Eu 6504a8460f chore: enable prettier cache, speeds up subsequent runs ~6.5x (#37005) 2025-07-10 20:32:12 +08:00
Han Qiao 7f099d0e4c chore: simplify config for realtime example (#30889) 2024-12-04 21:08:41 +08:00
Charis 652c4288e6 chore(docs): update examples for nextjs 15 breaking changes
cookies() is now asynchronous
2024-10-30 10:13:57 -04:00
Wen Bo Xie 18fe759e29 fix: update Realtime AuthZ README (#22816) 2024-09-30 18:57:02 +00:00
Tyler 76e208371c example: Update Flutter Figma clone app (#28593)
Add authorizations to Flutter figma clone
2024-08-13 21:14:16 +09:00
Wen Bo Xie b7d4d64fee fix: update Realtime AuthZ policies in docs/demo (#27863) 2024-07-08 18:23:03 -04:00
Chase Granberry ce808954df docs: init Realtime authz docs (#22803)
* chore: init Realtime authz docs

* fix: some Vale fixes

* fix: run Prettier

* fix: Prettier

* fix: add note to contact us with placeholder link

* fix: swap rules for policies

* fix: lots of changes

* fix: update for latest Authz model

* fix: nits

* fix: more nits

* fix: nit

* edits

* fix: remove realtime.channel names and fix `in` filters

* fix: caps

* fix: moar

* fix: change h3 to h4

* fix: clarify interaction with postgres_changes

* fix: added simple steps to enable

* Update apps/docs/content/guides/realtime/authorization.mdx

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

* Update apps/docs/content/guides/realtime/authorization.mdx

Co-authored-by: Wen Bo Xie <5532241+w3b6x9@users.noreply.github.com>

* Update apps/docs/content/guides/realtime/authorization.mdx

Co-authored-by: Wen Bo Xie <5532241+w3b6x9@users.noreply.github.com>

* Update apps/docs/content/guides/realtime/authorization.mdx

Co-authored-by: Wen Bo Xie <5532241+w3b6x9@users.noreply.github.com>

* fix: add clarity to how it works

* fix: `features` to `extensions`

* fix: clarity

* fix: spelling

* fix: add detail about the test query.

* updates

* updates

* updates

* fix: update schema

* fix: prettier

* fix: rewrite section

* fix: create tables sql

* fix: shorten policy names

---------

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
Co-authored-by: Wen Bo Xie <5532241+w3b6x9@users.noreply.github.com>
Co-authored-by: Wen Bo Xie <wenbo.xie3@gmail.com>
2024-07-02 14:46:29 -04:00
Wen Bo Xie 83ecfa5e76 fix: simplify rooms_users policies (#27629) 2024-06-28 18:04:02 -04:00
Filipe Cabaço 7630e448dc fix: Change example to use the new Authz format (#27570)
Change example to use the new Authz format
Co-authored-by: Wen Bo Xie <5532241+w3b6x9@users.noreply.github.com>
2024-06-27 22:54:34 +01:00
Filipe Cabaço 6acb28ed56 doc: Add Realtime Authorization Demo (#22500)
Add the Realtime Authorization Demo

---------

Co-authored-by: Wen Bo Xie <5532241+w3b6x9@users.noreply.github.com>
Co-authored-by: Wen Bo Xie <wenbo.xie3@gmail.com>
2024-04-12 23:29:00 +01:00
Tyler b3e43567d8 blog: Add Flutter Figma clone blog article (#20768)
* Minor code example fix on Flutter example

* blog: add flutter figma clone blog article

* Run formatter

* update the images
2024-01-26 16:54:39 +01:00
Tyler 7b26792d3f examples: Add Flutter Figma clone app to the realtime examples (#20726)
* examples: Add Flutter Figma clone app to the realtime examples

* change the folder name to flutter-figma-clone
2024-01-25 19:08:09 +09:00
Tyler eae972b55a blog: update past Flutter blog content to use supabase_flutter v2 (#19634)
* update flutter quick start and example app to use flutter v2

* update examples and blog articles to use Flutter SDK v2

* fix versions used in examples

* update image picker to 1.0.5

* minor code refactor for sample code
2023-12-19 11:34:03 +09:00
dependabot[bot] 63650c485d chore(deps-dev): bump word-wrap
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-19 16:56:05 +00:00
dshukertjr 082870ab88 updated dart version constraints 2023-06-15 11:46:15 +09:00
dshukertjr 4506a9a7c4 remove yarn.lock and yarn related instruction 2023-04-20 09:47:11 +09:00
dshukertjr 30eede733b update auth helpers version 2023-04-12 15:13:47 +09:00
dependabot[bot] b7c28ac815 Bump json5 in /examples/realtime/nextjs-auth-presence
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-12 05:41:14 +00:00
Tyler a143303ca5 fix: correct the link on the readme of flutter game example app 2023-02-15 11:39:25 +09:00
dshukertjr a2ae8a2cfc updated readme: 2023-02-14 17:25:05 +09:00
dshukertjr 886da31339 run prettier 2023-02-14 16:56:09 +09:00
dshukertjr 7046f7d3e4 adds flutter multiplayer shooting game example app 2023-02-14 16:11:30 +09:00
Alaister Young 0912019806 fix: minor spelling fixes 2023-02-14 16:20:45 +11:00
Alaister Young 3ca00f86af organize imports and remove deprecated withPageAuth 2023-02-13 12:12:09 +11:00
meera-datey ae2caf50e2 Prettified and added useEffect for onAuthStateChange 2022-12-31 16:38:21 -05:00
meera-datey fd553cc040 Readme updated. 2022-11-05 21:03:57 -07:00
meera-datey 8aebf14f34 nextjs example program for real time presence. 2022-11-05 20:42:14 -07:00