Commit Graph

8 Commits

Author SHA1 Message Date
Tom Moses 107458887e examples(with-supabase): fix import statement in tutorial (#83605)
Fixed import statements in tutorial code to point to files in the
correct folders.

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-09-09 11:59:00 +00:00
Karthikeya Thatipamula 76ebbb9768 docs: add missing RLS step to Next.js tutorial (#82714)
## What
This PR updates
`examples/with-supabase/components/tutorial/fetch-data-steps.tsx` to
include a missing step about enabling Row Level Security (RLS) and
creating a simple read policy for the `notes` table.

Fixes: #82218

## Why
Currently, the tutorial shows how to:
- create a `notes` table
- insert data
- query data from Next.js

However, since RLS is enabled by default in Supabase, new users will get
`permission denied` errors when querying data unless they configure
policies.
The official Supabase Next.js quickstart docs already mention this:  
https://supabase.com/docs/guides/getting-started/quickstarts/nextjs

Adding this step will help newcomers understand why RLS is required and
how to set it up.

## Changes
- Added a new `<TutorialStep>` in `fetch-data-steps.tsx`:
  - Explains that RLS is enabled by default
  - Shows SQL snippet to enable RLS + create a public read policy
  - Links to the Supabase RLS docs

## Checklist
- [x] Added RLS tutorial step
- [x] Verified formatting matches other tutorial steps
- [x] Added links to relevant Supabase docs

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-08-20 22:46:26 +00:00
Ivan Vasilov 2b7a259169 chore: Update the with-supabase example to use the Supabase Auth block (#78913)
This PR updates the `with-supabase` template to better auth pages,
Tailwind v4 and newest `components.json` for full compatibility with
shadcn/ui.

The `(auth-pages)` folder has been removed. For auth, the template is
now using the [password based auth
block](https://supabase.com/ui/docs/nextjs/password-based-auth) from the
Supabase UI Library which makes it easier to update it and keep it
up-to-date.

---------

Co-authored-by: Lee Robinson <lee@leerob.com>
2025-05-28 12:19:55 -05:00
Terry Sutton c919f09a1c examples: fix supabase example for v15 (#76567) 2025-02-26 15:50:00 -06:00
Jonathan Summers-Muir d66ea6ad50 examples: further supabase improvements (#69407)
Co-authored-by: Lee Robinson <me@leerob.io>
2024-08-28 09:51:31 -05:00
Jonathan Summers-Muir 7da39c77e0 examples: fix supabase build (#69394) 2024-08-27 23:37:24 -05:00
Jonathan Summers-Muir 00f70f2052 examples: improve Supabase example (#69308)
Co-authored-by: Terry Sutton <saltcod@gmail.com>
Co-authored-by: Lee Robinson <me@leerob.io>
2024-08-27 22:09:10 -05:00
Jon Meyers 5b48db23b1 Add protected page and pending state to with-supabase example (#62211)
### What?

[1] Add protected page
[2] Add pending state

### Why?

[1] People using incorrect ways to protect pages
[2] No feedback that the login page is doing anything when buttons
clicked

### How?

[1] Redirect user to protected page after successful authentication
[2] Use useFormStatus to determine whether the form is in a pending
state

---------

Co-authored-by: Sam Ko <sam@vercel.com>
2024-02-19 01:12:58 +00:00