Commit Graph

173 Commits

Author SHA1 Message Date
Tomás Pozo
e3be344f5c fix(examples): read new API keys directly from parsed SUPABASE_SECRET_KEYS (#46604)
## Problem

Edge Function examples that use the new publishable/secret API keys read
them with a double lookup:

```ts
const SUPABASE_SECRET_KEYS = JSON.parse(Deno.env.get('SUPABASE_SECRET_KEYS')!)
const secretKey = Deno.env.get(SUPABASE_SECRET_KEYS['default']) //  returns undefined
```

`SUPABASE_SECRET_KEYS` / `SUPABASE_PUBLISHABLE_KEYS` are a JSON object
that maps a key name to the **actual key value** (e.g.
`{"default":"sb_secret_..."}`), confirmed by:
- the self-hosted injection in `docker/docker-compose.yml`
(`SUPABASE_SECRET_KEYS: "{\"default\":\"${SUPABASE_SECRET_KEY:-}\"}"`)
- the `@supabase/server` SDK README

So `SUPABASE_SECRET_KEYS['default']` is already the key. Wrapping it in
another `Deno.env.get(...)` looks up an env var named `sb_secret_...`,
which doesn't exist, so the value is `undefined` and the examples fail
at runtime.

## Fix

Unwrap the outer `Deno.env.get(...)` so the key is read directly:

```ts
const SUPABASE_SECRET_KEYS = JSON.parse(Deno.env.get('SUPABASE_SECRET_KEYS')!)
const secretKey = SUPABASE_SECRET_KEYS['default'] // 
```

Applied across 23 files (example functions, the
`examples/prompts/edge-functions.md` codegen guidance, and two docs
guides). The correct `JSON.parse(Deno.env.get('SUPABASE_SECRET_KEYS')!)`
declaration line is untouched. The generated `apps/docs/examples/` copy
regenerates from `examples/` at build time.

## Notes

- Docs context:
[#46600](https://github.com/supabase/supabase/pull/46600), which
documents the same key model.
- Follow-up (not in this PR): a few examples send the secret key on the
`Authorization: Bearer` header, which the new keys reject. Worth a
separate audit.

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

* **Documentation**
* Clarified examples and guides for correctly reading parsed Supabase
secret and publishable key maps.

* **Examples**
* Standardized credential usage across Edge Functions and samples so
Supabase clients consistently receive keys from the parsed key maps
rather than indirect lookups.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>
2026-06-03 11:05:20 -05:00
Lenny
2a8dc75e3d chore(docs): use more restrictive RLS policies for storage in example projects (#46172)
## 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?

Storage RLS polices unintentionally allow list access to buckets
potentially setting a bad example for people starting a new project.

## What is the new behavior?

Use more restrictive RLS polices that only allow the intended operations


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

* **Documentation**
* Updated Supabase Storage access-control policies and examples across
docs and starter projects.
* Tightened avatar image access rules to require explicit operation
checks for public reads.
* Clarified guidance and added explanatory comments in migration and
README examples to illustrate the updated access patterns.

<!-- 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/46172?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-29 11:47:01 +02:00
Danny White
a45776ecb9 feat(studio): restrict auth email template editing for free projects (#45396)
## What kind of change does this PR introduce?

Feature / abuse-prevention update. Resolves DEPR-198.

## What is the current behaviour?

Free projects using Supabase's built-in email service can edit raw Auth
email template subjects and HTML in Studio. That is the risky cohort
this project is trying to constrain.

## What is the new behaviour?

### Template editing restrictions

For free projects using Supabase's built-in email service, Studio keeps
Auth email templates viewable and previewable but disables subject/body
editing and saving. Editing is unlocked by setting up Custom SMTP,
configuring a send-email hook, or upgrading to a paid plan.

**Grandfathering:** projects created before `2026-06-01T00:00:00Z` (the
platform enforcement cutoff) are exempt; their editing UI stays
unlocked. This mirrors `FREE_TIER_TEMPLATE_BLOCK_CUTOFF_DATE` in the
platform PR exactly.

| After |
| --- |
| <img width="1024" height="759" alt="Emails Authentication Fizz Test
Supabase-173BB09B-0FB9-4133-8202-9E310DDB347A"
src="https://github.com/user-attachments/assets/c966212d-ed0c-443b-8197-440cc2937ef6"
/> |
| <img width="1024" height="759" alt="Emails Authentication Fizz Test
Supabase-CD5845EB-0E45-4779-8989-44E775B2411A"
src="https://github.com/user-attachments/assets/055a64d6-b5e8-4d37-a261-6e280f04536a"
/> |

### Warning dialogs on transitions that reset templates

Two flows now surface a warning before the user commits to a state
change that resets their custom email templates to defaults:

1. **Disabling custom SMTP** (SMTP settings page): a confirmation dialog
warns that templates will be reset to defaults and the email rate limit
reduced to 2 per hour. On confirm, Studio resets all 13 templates via
the existing per-template reset endpoint (`Promise.allSettled`). The
"won't be able to edit" sentence is shown only for post-cutoff projects;
grandfathered projects skip it. The corresponding server-side
enforcement is in the Platform PR:
https://github.com/supabase/platform/pull/33129

2. **Downgrading to the Free plan** (billing settings): an admonition in
the existing downgrade confirmation modal warns that custom templates
will be reset to defaults and won't be editable without custom SMTP. The
admonition is shown only when the org has at least one post-cutoff
project; orgs whose projects are all grandfathered skip it.

| Custom SMTP | Downgrading |
| --- | --- |
| <img width="862" height="586" alt="66764"
src="https://github.com/user-attachments/assets/6470c8a6-2f79-40a5-ad3b-bfe5b0ba9c54"
/> | <img width="1268" height="1552" alt="CleanShot 2026-05-22 at 17 28
37@2x-FEB1901E-38E6-42DF-8C27-0A036D8A1B94"
src="https://github.com/user-attachments/assets/e8caa9e6-c3ed-4787-b771-af77a43eb854"
/> |

### Informational admonition when enabling SMTP

When a user enables custom SMTP for the first time, a sandwiched
admonition above the save footer informs them that the email rate limit
will be increased to 30 per hour and can be adjusted.

_This is just a minor cosmetic change, unrelated to the email template
disabling. Sorry._

| Before | After |
| --- | --- |
| <img width="1024" height="759" alt="Emails Authentication Chisel
Toolshed Supabase-54317D18-803C-4A58-8211-2359355D083B"
src="https://github.com/user-attachments/assets/29eff649-02dc-40f3-a379-0b4d484a76c7"
/> | <img width="1024" height="759" alt="Emails Authentication Chisel
Toolshed Supabase-9E12399E-E9FB-4F9A-B029-A08008EA4B50"
src="https://github.com/user-attachments/assets/e542ed86-4da6-407e-8293-0f4c0f071e18"
/> |

## How to test

All existing projects pre-date the enforcement cutoff
(`2026-06-01T00:00:00Z`) and are grandfathered, so the restriction UI
won't appear by default. To force the restricted state locally,
back-date the cutoff in one file:

In
`apps/studio/components/interfaces/Auth/EmailTemplates/EmailTemplates.utils.ts`,
temporarily change:

```ts
export const FREE_TIER_TEMPLATE_BLOCK_CUTOFF_DATE = '2026-06-01T00:00:00Z'
```

to:

```ts
export const FREE_TIER_TEMPLATE_BLOCK_CUTOFF_DATE = '2025-01-01T00:00:00Z'
```

Revert before committing. With the cutoff back-dated, use a free-plan
project and:

- **Template restriction + admonition:** navigate to Authentication >
Emails with no custom SMTP configured. Subject/body fields should be
read-only and the "Set up SMTP" admonition should appear, with its
dropdown offering upgrade and send-email hook options.
- **SMTP disable warning:** enable custom SMTP on a project, then
disable it via Authentication > SMTP Settings. The confirmation dialog
should warn that templates will reset to defaults and that editing will
be restricted after disabling.
- **Downgrade warning:** in billing settings, initiate a downgrade to
the Free plan. The downgrade modal should include an admonition warning
about template reset and restricted editing (only if the org has at
least one post-cutoff project).

## Additional context

The default Auth email template copy was also improved across docs,
examples, and UI library snippets (separate prior commits).

The per-template reset button (`ResetTemplateDialog`) was migrated to
the async `AlertDialogAction` pattern introduced in #45960; the dialog
stays open and shows a loading state while the reset is in-flight,
closes on success, and stays open on error.

Closes PRODSEC-183

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-authored-by: Stephen Morgan <stephen@doublethink.co.nz>
2026-05-28 17:23:45 +12:00
Chris Chinchilla
8b01d388b9 docs: Remove leftover auth-ui components (#45931)
## 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 authentication guide for Kotlin Compose Multiplatform with
revised dependency configuration.
* Enhanced user-management example README with improved project
structure, deployment steps, and resources.

* **Chores**
* Refactored example applications to use custom authentication forms
instead of pre-built Auth UI components.
* Removed unused authentication UI dependencies from multiple example
projects.

<!-- 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/45931)

<!-- review_stack_entry_end -->

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

---------

Co-authored-by: Cemal Kılıç <cemalkilic@users.noreply.github.com>
2026-05-14 15:42:09 +00:00
Chris Chinchilla
ed123799ca docs: tutorials using auth methods to explain differences (#45539)
## 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 API key changes (new publishable/secret scheme, where to
obtain each, legacy keys valid through end of 2026) and updated many
getting-started tutorials with clearer setup, flow, and auth guidance.
* **New Features**
* Added/expanded profile photo/avatar upload and account integration
steps across multiple tutorials.
* **Guides**
  * Added guidance on auth helper methods and when to use them.
* **Examples**
  * Example app updated to use token claims for auth state.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Katerina Skroumpelou <mandarini@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-05-06 14:48:21 +00:00
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
hallidayo
b99a9ea416 docs: react native expo user management update (#42300)
## 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 - [React Native Expo user management
guide](https://supabase.com/docs/guides/getting-started/tutorials/with-expo-react-native)

## What is the new behavior?

Guide has been updated to be in line with #42269 

- Removing `@rneui/themed` package and using native components.
- Update guide screenshot.
- Main stylesheet for the example.


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

## Summary by CodeRabbit

## Documentation
- Updated Expo React Native tutorial with modernized component approach
using React Native primitives and centralized styling patterns.
- Simplified codebase examples with consistent formatting and improved
maintainability.
- Core functionality preserved with updated implementation patterns.

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

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

---------

Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>
Co-authored-by: Chris Chinchilla <chris@chrischinchilla.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-23 12:09:10 +01: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
Chris Chinchilla
2fe1d2935c docs: Update Ionic React guide with correct auth methods, updated dependencies, and code sample component (#43858)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-26 09:36:04 +00:00
Ahmad Yasser
63b80b5e92 fix(docs): initialize FormBuilder in constructor in Angular tutorial (#42600)
### What kind of change does this PR introduce?

Bug fix — corrects a TypeScript initialization error in the Angular user
management tutorial example.

### What is the current behavior?

In the Angular tutorial's `AuthComponent`, `signInForm` is declared with
a non-null assertion (`signInForm!: FormGroup`) and initialized inside
`ngOnInit()`. This causes a TypeScript strict-mode error because
`formBuilder` is used before the constructor runs. Developers following
the tutorial encounter:

> Property 'formBuilder' is used before being initialized.

### What is the new behavior?

`signInForm` is now initialized in the constructor, matching the pattern
already used by `AccountComponent` in the same example project. The
non-null assertion is removed since the property is properly assigned
during construction.

### Changes


**`examples/user-management/angular-user-management/src/app/auth/auth.component.ts`**
- Moved `signInForm` initialization from `ngOnInit()` into the
constructor
- Removed non-null assertion operator (`!`) from `signInForm`
declaration
- Reordered property declarations for consistency (`loading` before
`signInForm`)

### Additional context

The sibling `AccountComponent` already follows the correct pattern —
initializing `updateProfileForm` inside the constructor (line 35). This
PR aligns `AuthComponent` with that established convention.

Closes #34392

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

## Summary by CodeRabbit

* **New Features**
  * Added a loading indicator state to the authentication form.

* **Refactor**
  * Restructured form initialization logic for improved component setup.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-03-25 15:44:19 +00:00
Chris Chinchilla
8e33378315 docs: Update nextjs user management guide to use getClaims (#44124) 2026-03-24 21:22:41 +01:00
Chris Chinchilla
0efa8a036a docs: Update SvelteKit User management tutorial with correct auth methods (#44077)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-23 16:50:07 +01: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
bb1ced5e10 docs: Update ionic vue example with more appropriate auth methods, code sample component, and language changes (#43817)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-17 13:07:43 +01:00
Chris Chinchilla
81dd47a421 docs: Rework vue3 example and use codesample component (#43703)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

---------

Co-authored-by: Jeremias Menichelli <jmenichelli@gmail.com>
2026-03-16 11:16:32 +01:00
Chris Chinchilla
8cfdc8576e docs: Expo User Management auth changes (#43568)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES/
2026-03-10 12:10:35 +00:00
Chris Chinchilla
c20cfe832a docs: Update getSession usage in Angluar ionic tutorial (#43489)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES
2026-03-09 10:26:54 +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
Bayu Darmawan
a2d0eafcc4 fix(docs): replace deprecated getSession with getClaims in Refine tutorial (#43203)
## What kind of change does this PR introduce?

Documentation update

## What is the current behavior?

The Refine tutorial uses `supabaseClient.auth.getSession()` in the
`authProvider.check` method to verify authentication. `getSession` is
deprecated and not recommended for auth verification.

## What is the new behavior?

Replaced `getSession()` with `getClaims()` which reads claims from the
locally cached JWT. This is the recommended approach as mentioned in the
issue.

## Files changed

- `apps/docs/content/guides/getting-started/tutorials/with-refine.mdx` —
Updated `check` method in the authProvider code example
-
`examples/user-management/refine-user-management/src/providers/auth-provider.ts`
— Updated the corresponding example code to match

Closes #42193

---------

Co-authored-by: gorillaworkout <bayudarmawan215@gmail.com>
Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>
2026-03-02 11:14:50 +01:00
slegarraga
d727d33db9 docs: replace deprecated getSession with getClaims in SolidJS tutorial (#43034)
Fixes #42192

Replaces the deprecated `getSession` call with `getClaims` in the
SolidJS tutorial documentation (`with-solidjs.mdx`).

Changes:
- `supabase.auth.getSession()` → `supabase.auth.getClaims()`
- `data.session` → `data.claims`

This follows the recommended migration pattern per the Supabase auth
docs, and is consistent with the same fix applied to the Refine tutorial
in #43006.

---------

Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>
2026-02-25 08:30:14 +01:00
Chris Chinchilla
d23302d2f5 docs: Fix breaking rendering issues (#43096)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES
2026-02-23 16:22:15 +01:00
Chris Chinchilla
b1a453ac0f docs: Update React User Management tutorial (#42379)
## 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**
* Simplified React getting-started tutorial: concise, action-oriented
steps, inline code replaced by external sample references, removed the
Bonus: Profile photos section, and expanded README guidance and setup
steps.

* **Examples**
* User-management example converted to a user-focused auth flow with
safer unmount handling, adjusted profile/account interactions, and
updated sample references.

* **Chores**
* Upgraded example dependencies and tooling to align with newer React
and ecosystem versions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-02-02 23:40:56 +00:00
Chris Chinchilla
23fb86f9a6 docs: Rework Angular tutorial with correct auth methods, new best practices, and more (#42151)
* Changes

* Draft

* Restructure example to correct location

* Update apps/docs/content/guides/getting-started/tutorials/with-angular.mdx

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

* Update examples/user-management/angular-user-management/angular.json

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

* Revert CSS

* Prettier

* Update dependencies

* Update examples/user-management/angular-user-management/src/styles.css

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

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-01-27 00:42:25 +00: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
Andrew Agostini
5e4e519f6c docs: Fix broken URLS batch 3 (#40508)
* docs: remove link to token-transformer since that repo has since been refactored and no particular file contains the code originally linked to

* docs: update Redis link in rate limiting examples to point to the correct URL

* docs: update Supabase URLs to current magic link docs

* docs: update README for postgres-on-the-edge function to remove polyscale line (service no longer exists) and add resource links to relevant deno blog post

* docs: update Open Graph image generation examples links to the new documentation URL

* docs: update README with new Quickstart: Swift guide URL

* docs: update Supabase Vector links to reflect new URL

* docs: add two new link suggestions the replace the current broken one. Choose one.

* docs: update documentation links for Postgres Language Server to reflect new URL

* docs: update event trigger matrix documentation link to compensate for fact that 'current' verb does not work for some of their links

* Update apps/docs/content/troubleshooting/supabase-grafana-memory-charts.mdx

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

---------

Co-authored-by: Chris Chinchilla <chris@chrischinchilla.com>
2025-11-28 10:56:17 +00:00
Batuhan Wilhelm
8cfe645f2b docs: update Refine branding (#40378)
* docs: update Refine svg in HeroFrameworks

* docs: use capital R for Refine mentions

* docs: use main branch for Refine repository references

* docs: update connect interface example code for Refine

* docs: update Refine quick start tutorial with Refine v5

* examples(refine-user-management): upgrade to Refine v5

* docs: update Refine getting started tutorial with Refine v5

* chore(studio): update Refine icon on Connect modal

* docs: update Refine svg

* docs: update welcome screen screenshot in Refine tutorial

* docs: update dimensions of welcome screen screenshot in Refine tutorial

* chore: remove leftover dist assets from Refine example

* chore(linter): add Refine to Rule001 and Rule003

* chore: format getting started with Refine.mdx

* chore: remove .prettierrc file from the example
2025-11-18 22:34:00 +09:00
samrose
6bb9791cb2 fix: update critical vuln on dep in example app (#40330) 2025-11-11 15:51:37 -05:00
dependabot[bot]
9efc7cb2f8 chore(deps): bump vite from 7.0.5 to 7.1.5 in /examples/user-management/sveltekit-user-management (#38566)
chore(deps): bump vite

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 7.0.5 to 7.1.5.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v7.1.5/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 7.1.5
  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 19:59:11 +00: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
Oleg Polin
4b2705f0ba fix(docs): update SvelteKit tutorial to use Svelte 5 syntax (#31229)
* docs: Update SvelteKit auth tutorial project creation syntax (#31114)

* docs: Update link to SvelteKit docs (#31114)

* Update +layout.svelte to Svelte 5 syntax (#31114)

* Update +page.svelte to use Svelte 5 syntax (#31114)

* Update account +page.svelte to use Svelte 5 syntax (#31114)

* Update account Avatar.svelte to use Svelte 5 syntax (#31114)

* Update SvelteKit example to Svelte 5 syntax (#31114)

* docs: Update npm dependencies (#31114)

* Start review

* Finish review

* Update code for SvelteKit 5

* Convert to codesamples

---------

Co-authored-by: Chris Chinchilla <chris@chrischinchilla.com>
Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>
2025-08-12 16:38:06 +02:00
Chris Chinchilla
e6e24aadad docs: Update user management docs for next JS (#37664)
* Draft

* Update text for guide

* Update text for guide

* Update code for newer next js versions

* Final small change

* Update apps/docs/content/_partials/project_setup.mdx

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

* Changes from review

* Use project name in tutorial text

* Fix up inclusion

* Fix inclusion

* Prettier

---------

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
2025-08-07 08:45:39 +00:00
Chris Chinchilla
74a1cd8dfe docs: Update User management quickstart to Svelte 5 (#37646)
* General updates and switch to Svelte 5

* Update code example to Svelte 5

* Update some examples to use codesamples component

* Add Svelte to codesample component

* Final code updates

* Add more CodeSample components
2025-08-05 13:40:50 +00:00
Chris Chinchilla
0e2bd38457 Update Angular tutorial to use v20 (#37380)
* Add Chris Ward to humans

Signed-off-by: Chris Chinchilla <christopher.ward@supabase.io>

* Update Angular tutorial for Angular 20

* Update Angular doc

* Revert "Add Chris Ward to humans"

This reverts commit c45ea9d213.

* Update tsconfig

* Add note about CLI defaults

* Prettier fix

---------

Signed-off-by: Chris Chinchilla <christopher.ward@supabase.io>
Co-authored-by: Chris Chinchilla <christopher.ward@supabase.io>
2025-07-28 16:27:50 +02:00
Abhinanda_Shetty
39c921018c Fix Issue #26280 "User Management App" Docs - safeGetSession typescript error (#37012)
fix SvelteKit "User Management App" Docs - safeGetSession typescript error
2025-07-14 15:11:05 +00:00
Beng Eu
6504a8460f chore: enable prettier cache, speeds up subsequent runs ~6.5x (#37005) 2025-07-10 20:32:12 +08:00
Andrew Valleteau
9524eff4f8 chore(docs): update user management next docs (#30849)
* chore(docs): update user-management config toml
2024-12-04 13:16:10 +00:00
Brian Canzanella
08a45f4fa0 fix: invalid example toml file (#30718)
Co-authored-by: Han Qiao <sweatybridge@gmail.com>
2024-11-29 08:54:56 +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
Vincent Fretin
ce724e91bb Fix wrong style width value in solid tutorial (#29688)
* Fix wrong style width value in solid tutorial

* update the line also in the code

* sync with the doc
2024-10-04 14:26:40 +00:00
Tyler
a916150022 example: Update web, iOS, and Android code to the latest Flutter version (#29582)
* example: Update web, iOS, and Android code to the latest Flutter version

* Update dev dependencies to the latest
2024-09-30 13:22:04 +08:00
dependabot[bot]
c5cd122400 chore(deps-dev): bump nuxt from 3.5.3 to 3.12.4 in /examples/user-management/nuxt3-user-management (#28401)
chore(deps-dev): bump nuxt

Bumps [nuxt](https://github.com/nuxt/nuxt/tree/HEAD/packages/nuxt) from 3.5.3 to 3.12.4.
- [Release notes](https://github.com/nuxt/nuxt/releases)
- [Commits](https://github.com/nuxt/nuxt/commits/v3.12.4/packages/nuxt)

---
updated-dependencies:
- dependency-name: nuxt
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-20 16:32:40 +02:00
dependabot[bot]
9ef9e2e3be chore(deps-dev): bump @nuxt/devtools from 0.5.5 to 1.3.9 in /examples/user-management/nuxt3-user-management (#28400)
chore(deps-dev): bump @nuxt/devtools

Bumps [@nuxt/devtools](https://github.com/nuxt/devtools/tree/HEAD/packages/devtools) from 0.5.5 to 1.3.9.
- [Release notes](https://github.com/nuxt/devtools/releases)
- [Changelog](https://github.com/nuxt/devtools/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nuxt/devtools/commits/v1.3.9/packages/devtools)

---
updated-dependencies:
- dependency-name: "@nuxt/devtools"
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-06 11:07:54 +02:00
Andrew Smith
b79a138055 fix(docs): update ssr guides and examples for nextjs and svelte (#27834)
[Summary by Charis]
Update SSR guides and examples for Next.js and Svelte:
- New `@supabase/ssr@0.4.0` API
- Misc. Svelte fixes
2024-07-08 15:06:59 -04:00
Jens Hauke
33a6bd439a Example react-user-management: Unsubscribe onAuthStateChange listener. (#27799)
Example react-user-management:
Unsubscribe the sb.auth.onAuthStateChange listener on component cleanup.
2024-07-04 16:24:24 +00: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
Tyler Pfaff
33c7e812c4 Fix errors being swallowed in account_page.dart and login_page.dart fixes #27104 (#27143)
* Refactor login_page with a _showSnackBar function

* Add an onError block to onAuthStateChange

Errors get swallowed without this error handler, I noticed it when I had requested too many magic link emails, there was no feedback in the ui, nor in the logs in the console.

* Fix SnackBars not being displayed and add a _showSnackBar function

* Fix code samples for login_page.dart and account_page.dart to reflect fixes in #27104

* Fix isError not being passed for an Unexpected Error in login_page

* Update flutter user management example to a more modern code

* Update the guide to match the new content

* run formatter

* got rid of excess code and minor format fix

---------

Co-authored-by: dshukertjr <dshukertjr@gmail.com>
2024-06-14 09:19:10 +00:00
cyluss
bfa54a2ca1 docs: Fix incorrect RLS original word in examples (#26937)
Fix incorrect RLS original word

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
2024-06-04 01:08:30 +00:00