Commit Graph

74 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
Jon Meyers ea17efb589 docs: Remove DEFAULT from publishable keys env name in docs (#44696)
## 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?

Inconsistent naming of publishable key environment variables across
dashboard, docs, ai skills, templates etc

## What is the new behavior?

Consistent naming of publishable key environment variables across
dashboard, docs, ai skills, templates etc


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

## Summary by CodeRabbit

* **Chores**
* Updated environment variable naming across example projects. Changed
`VITE_SUPABASE_PUBLISHABLE_DEFAULT_KEY` to
`VITE_SUPABASE_PUBLISHABLE_KEY` in configuration and initialization
files for the React quickstart and user-management examples.

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

Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>
2026-04-13 09:53:01 +00: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 c0f7e7dfd1 docs: Rework Expo React native social auth (#43017)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

Reworks Expo React native social to use appropriate auth methods and
restructures to use external code.

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-02-23 08:54:17 +01:00
Chris Chinchilla 8f08df1600 docs: Update reworked getSession tutorials to use correct functions and clarify why (#42269)
## 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**
* Clarified React Native and Angular auth guides with improved
environment setup and JWT validation guidance.

* **New Features**
  * Added a React Native environment template for quickstart.
  * Example app now uses JWT claims for user state and display.

* **Chores**
* Replaced UI library components with native React Native components for
compatibility.
  * Updated package configuration and dependency versions.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-01-30 02:27:37 +00:00
Chris Chinchilla 398480a3cd docs: Update react auth quickstart to use getClaims and move all code to examples folder (#42279)
## 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

* **New Features**
* Added a new React authentication quickstart example demonstrating
email-based OTP (magic link) authentication flow with Supabase
integration.

* **Documentation**
* Updated the React auth quickstart guide to use dynamic code samples
for improved maintainability.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-01-30 12:06:05 +11:00
Chris Chinchilla 587729411d docs: update React Native auth quickstart to remove getUser (#42196)
* Move old functions trouble shooting to new guides

* Replace getUser, update, and switch to codeblocks

* Revert "Move old functions trouble shooting to new guides"

This reverts commit 229c581172.

* Prettier

* Add env details

* Fixes
2026-01-28 00:16:28 +00:00
Danny White 19cf4bb4bf feat(studio): consolidate settings phase 2 (#37612)
* new slugs

* remove symlinks

* rabbit
2026-01-26 15:41:05 +08: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
Chris Chinchilla 534c300a7a docs: SSR overhaul combined client page PoC (#38405)
* Draft begins

* Starte SvelteKit

* Changes

* Consolidate creating a client

* Final draft

* Update apps/docs/content/guides/auth/server-side/creating-a-client.mdx

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update apps/docs/content/guides/auth/server-side/creating-a-client.mdx

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Rework and simplify

* Update apps/docs/content/guides/auth/server-side/creating-a-client.mdx

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update apps/docs/content/guides/auth/server-side/creating-a-client.mdx

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update apps/docs/content/guides/auth/server-side/creating-a-client.mdx

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

* improve spacing

* last

* Simplify example

* Prettier

* Fix hono, remove old pages, and add redirects

* Remove from menu

* Update apps/docs/content/guides/auth/server-side/creating-a-client.mdx

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

* Changes

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
Co-authored-by: Alan Daniel <stylesshjs@gmail.com>
2025-11-11 12:37:11 +00:00
MDL 3139f85b5d docs(react-native): Expo cross-platform social sign-in with complete example (#38178)
* docs(react-native): create the basic expo project

* docs(react-native): cross-platform Apple social sign-in

* docs(react-native): cross-platform Google social sign-in

* docs(react-native): fix typos

* docs(react-native): remove wrong entry in the `Connection` component

* Correct typos

* Prettier

* Draft

* Draft

* docs(react-native): use kebab-case file naming convention in Expo guide

- use kebab-case file naming convention in Expo guide
- add trailing semicolon to align with the standard Expo template conventions

* docs(react-native): use kebab-case file naming convention in Expo social auth example

* docs(react-native): update the packages of the Expo social auth example

* Fix

* Draft

* Changes

* Correct log message

---------

Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>
Co-authored-by: Chris Chinchilla <chris@chrischinchilla.com>
2025-09-19 16:53:35 +02:00
dependabot[bot] 0f072e7dca chore(deps): bump hono from 4.6.16 to 4.9.7 in /examples/auth/hono (#38665)
Bumps [hono](https://github.com/honojs/hono) from 4.6.16 to 4.9.7.
- [Release notes](https://github.com/honojs/hono/releases)
- [Commits](https://github.com/honojs/hono/compare/v4.6.16...v4.9.7)

---
updated-dependencies:
- dependency-name: hono
  dependency-version: 4.9.7
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-16 17:02:26 -02:30
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
Oscar 45e7c5d1db docs: fix incorrect filename in nextjs auth example README (#33939)
The README refers to `.env.local.example` instead `.env.example`.
This commit updates the README with the correct filename.
2025-03-10 08:44:49 +00:00
Thor 雷神 Schaeff d93c09b03a Thor/fix hono example (#32736)
* fix: hono example.

* fix: hono quickstart.

* chore: update numbered list.
2025-01-14 11:50:06 +09:00
Thor 雷神 Schaeff 8e67d1e0a7 feat: add Hono example and guide. (#32614) 2025-01-07 20:22:48 +08:00
abdellah hariti 7cdbbdaf72 await createClient() promise in AuthButton.tsx (#30909) 2024-12-05 19:09:41 +00:00
Gen Tamura fd9929be5a Update FetchDataSteps.tsx (#30360) 2024-11-07 15:08:32 +00:00
Charis 652c4288e6 chore(docs): update examples for nextjs 15 breaking changes
cookies() is now asynchronous
2024-10-30 10:13:57 -04:00
Francesco Sansalvadore b5eadc1455 change messaging (#29537)
* revert to mil

* update sitemap
2024-09-27 18:27:20 +02:00
Francesco Sansalvadore c172b6a516 scale to bill (#28792)
* scale to billions

* update og image

* update og image
2024-08-21 16:00:17 +02:00
Peter 476542f86d Update Supabase Bootstrap NextJS example to use new SSR methods (#28241)
* Update NextJS example to use new SSR methods

* Remove Debug message

* Double quote imports and set supabase package versions to latest

* missed a file
2024-08-02 18:15:35 -05:00
Joel Lee 029a4f7cb7 feat: update package-lock to use ssr v0.4.0 (#27503) 2024-06-25 06:03:58 +02:00
Charis 5d8cef6040 fix: update all examples and snippets to use select for auth rls func… (#22632)
fix: update all examples and snippets to use select for auth rls functions
2024-04-11 12:56:11 -04:00
Thor 雷神 Schaeff 5903b5d4a8 chore: prepare examples for cli bootstrap (#22428)
* chore: prep expo example.

* Modify Flutter user management example to use .env and initialize supabase

* chore: add .env support to swift-user-management

* chore: update supabase dependency for swift-user-management example

* chore: minor expo updates.

* chore: update auth nextjs example.

---------

Co-authored-by: dshukertjr <dshukertjr@gmail.com>
Co-authored-by: Guilherme Souza <grsouza@pm.me>
2024-04-05 17:26:36 +08: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
Tyler 1a0d92ba41 docs: update Flutter docs/ guides/ examples to reflect the new Skip nonce checks option for Google login (#18697)
* update example google sign in app

* update flutter google sign in example

* update flutter auth blog post to add skip nonce check content

* update google sign in guide to include skip nonce check content

* minor update on the code sample for google auth guide

* delete unused code from code sample

* minor update of the blog writing

* blog article refactor

* minor format fix

* Update apps/docs/pages/guides/auth/social-login/auth-google.mdx

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

* Update apps/docs/pages/guides/auth/social-login/auth-google.mdx

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

* Update apps/docs/pages/guides/auth/social-login/auth-google.mdx

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

* Update apps/www/_blog/2023-07-18-flutter-authentication.mdx

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

* Update apps/www/_blog/2023-07-18-flutter-authentication.mdx

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

* Update apps/www/_blog/2023-07-18-flutter-authentication.mdx

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

* Update apps/www/_blog/2023-07-18-flutter-authentication.mdx

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

* fix typo

---------

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
2023-11-04 06:26:06 +00:00
Tyler cb51a8bb9c fix: Update Google login example app, guide, and blog article to use new Google login flow for Flutter (#18222)
* update Flutter Google login example to use google_sign_in package

* update build.gradle to support multidex

* compatible with native google login

* update comments

* update readme of sample app

* fix the blog to use the new flow

* update google login guide for Flutter to use the new flow

* Add an intro line for Flutter native google auth guide
2023-10-16 15:40:46 +09:00
dependabot[bot] c1bb77923e chore(deps): bump word-wrap from 1.2.3 to 1.2.4 in /examples/auth/nextjs
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 17:31:47 +00:00
dshukertjr 7919704e07 reorder resources 2023-07-12 21:40:15 +09:00
dshukertjr e6000e05b1 update link 2023-07-12 21:39:36 +09:00
dshukertjr 5e4776ea81 fix image link 2023-07-12 21:13:10 +09:00
dshukertjr fdfc0de050 give mfa example readme some polish as well 2023-07-12 11:54:20 +09:00
dshukertjr 60a1ff27bb chore: update readme.md of Flutter native Google auth example 2023-07-12 11:40:47 +09:00
dshukertjr c55811e5bf add comment 2023-07-11 15:44:42 +09:00
dshukertjr 760bca9a9a fix: use reverse client ID to perform Google login 2023-07-11 13:43:27 +09:00
dshukertjr 2355c0eec3 upgrade min sdk version 2023-07-10 18:30:30 +09:00
dshukertjr b1529e93f7 example: adds flutter native google auth 2023-07-10 17:00:57 +09:00
Jon Meyers faec20853c revert set versions for package.json 2023-06-23 21:25:34 +10:00
Jon Meyers e5e007cadd update example apps 2023-06-23 21:04:50 +10:00
dshukertjr 082870ab88 updated dart version constraints 2023-06-15 11:46:15 +09:00
Jon Meyers a30a697ad2 add sitemap.ts 2023-06-14 10:22:41 +10:00
Jon Meyers e569e34ec4 use stable version of auth-helpers-nextjs package 2023-05-28 23:24:30 +10:00
Jon Meyers b290c64b6b update official next.js auth handlers example 2023-05-25 10:16:30 +10:00
Alaister Young 4bdef60e09 Merge branch 'master' into chore/switch-to-slash-dashboard 2023-05-23 17:11:44 +10:00
Khalifa Fumo 1b97e659e0 Update middleware.ts to check if user is logged in
I was experiencing an issue where I could not protect my routes within my Next.js 13 (app) app. I searched for a fix everywhere but the app router being a new development, I did not find any help, even within the supabase docs, so I set out to trying a fix for myself and I found this to work perfectly. You can now protect your routes such that only logged in users can access some pages. You can also configure the config such that the middleware is set to run (or not to run) on selected pages.
2023-05-14 18:28:20 +03:00
Alaister Young 9cdeb4fddb chore: switch to /dashboard 2023-05-11 22:34:22 +10:00