Commit Graph

51 Commits

Author SHA1 Message Date
Jon Meyers fc4f062ba9 Chore: Update with-supabase example to Next.js 16 (#86105)
### What?

Upgrade with-supabase example to be compatible with Next.js 16

### Why?

1. Users get console warnings about middleware vs proxy
2. Enabling Cache Components config results in build errors for async
behaviour outside Suspense boundary
3. Turbopack flag is default and therefore, no longer necessary on `npm
run dev`

### How?

1. Renamed all instances of `middleware` to `proxy`
2. Wraped async behaviour in Suspense boundaries
3. Removed --turbopack flag from `npm run dev`

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2025-11-17 22:41:21 -08:00
Carlo Quick 04c7cef99b [docs] fix(with-supabase): Update README env variables (#84745)
Closes #84734

Fixes environmental variable names in `with-supabase` example README to
match the actual `.env.example` file.

Updates `NEXT_PUBLIC_SUPABASE_ANON_KEY` to
`NEXT_PUBLIC_SUPABASE_PUBLISHABLE_OR_ANON_KEY` in two locations.

---------

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-10-13 13:07:28 +02:00
Ben Gubler 41e39426eb Remove automatic linting from build (#83136)
### What?
This PR removes the automatic ESLint linting that previously ran during `next build`. The documentation has been updated to reflect this change.

### Why?
As part of Next.js 16, we're removing the automatic build-time linting that was previously included in the build process. This gives developers more control over when linting runs by explicitly invoking their linter via npm scripts.

### How?
- Updated documentation to clarify that automatic build-time linting has been removed in Next.js 16
- Removed the `runLint` parameter and related linting code from the build process
- Removed the `verifyAndLint.ts` file which is no longer needed
- Simplified type checking code by removing lint-related functionality
- Removed ESLint telemetry during builds
2025-10-08 16:35:07 -07:00
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
Remco Haszing 7aa5d16231 Use the automatic runtime for type checking (#83159)
Co-authored-by: Sebastian "Sebbie" Silbermann <silbermann.sebastian@gmail.com>
2025-09-02 12:35:42 +02: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
Stojan Dimitrovski 8659d47c09 chore: Update with-supabase example to use getClaims() (#81383)
Updates the `with-supabase` example to use the new and much faster (when
project is configured with asymmetric JWT support)
`supabase.auth.getClaims()` function instead of `getUser()`.

---------

Co-authored-by: Benjamin Woodruff <benjamin.woodruff@vercel.com>
2025-07-15 15:31:46 -07: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
Jam Balaya 6aafef389b examples: improve DX while copying command to create new project (#73463)
## Description

Follow up #38410.
Some examples remain the multiple commands in a single block, and we
couldn't use copy button to select one line.
With this change users would be able to copy the command (using their
choice package manager) with a single click using the github copy
feature.

CC: @samcx 

### Adding or Updating Examples

- [x] The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- [x] Make sure the linting passes by running `pnpm build && pnpm lint`.
See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md
2025-01-14 05:38:46 +00:00
Damien Sedgwick a216207891 Removed duplicated cn function declaration from lib dir (#74065)
This pull request removes duplication of a utility function within the
`with-supabase` example as mentioned in the following issue #73942 - I
removed the duplicated code from the `utils` directory as when shadcn
installs a new component, that component will look for the helper
function in `lib/utils.ts` and forcing users to update every component
after installation or modify any config files for shadcn seems like a
worse DX.

- Fixes https://github.com/vercel/next.js/issues/73942

---------

Co-authored-by: samcx <sam@vercel.com>
2024-12-18 18:40:30 +00:00
マルコメ f54d597563 examples: update gitignore files for parity for yarn recommendations (#71956)
## What?
Update examples `.gitignore` files for parity with [Yarn's official
recommendations](https://v3.yarnpkg.com/getting-started/qa#which-files-should-be-gitignored),
accounting for Yarn's modern Plug-n-Play functionality.

## Why?
New projects initialized with `create-next-app` presently add various
extraneous files from the Yarn cache to the initial commit. This is most
notable in the case of the Next SWC binary, which may exceed 100M in
some environments (empirically, 64-bit Darwin and WSL2 Ubuntu, and very
probably other unix/linux environments), and prevent users from pushing
their new projects to free GitHub repositories without rewriting the
commit history to exclude the extraneous files, or unnecessarily setting
up Git LFS to include them.

## How?
I have errored on the side of exclusion to enable users to push their
CNA projects to GitHub as-is and for parity with other package managers,
while still providing the opportunity to opt in to additional
functionality provided by modern Yarn.

These changes follow the recommendations for
**non**-[Zero-Install](https://yarnpkg.com/features/caching#zero-installs)
configurations, as Zero-Install functionality is an extension on top of
the base package manager experience, and may necessitate additional
configuration and present additional complications for unsuspecting
users, so I think it's best left up to the user to opt-in. On account of
the majority of publicly available Next.js-based projects comprising
general consumer-facing websites, it is my belief that the majority of
Next projects would not benefit from Yarn's Zero-Install functionality,
and that explicitly facilitating it by default would break status quo
with all other non-Yarn CNA projects.

Contrary to the example `.gitignore`s provided by Yarn, I've excluded
the `.yarn/sdks` directory as it contains IDE-specific tooling; I feel
it would be presumptuous for an environmentally-agnostic tool to target
and provide package-manager-specific tooling for specific editors. This
too should be left to the user to opt-in to and provide for their
project if they deem necessary.

I have retained the current `.gitignore`'s exclusion of the `/.pnp`
directory for backwards compatibility with older versions of Yarn (the
files therein have since been reallocated to the `.yarn` directory
addressed by these changes, but I am not clear on when that delineation
occurred or the prevalence of Yarn installations which depend on the
former convention). Maintaining the exclusion here, in the worst case,
implies additional downloads (on an order of magnitude merely similar to
using npm from the outset) rather than failure.

CC: @samcx 

### Adding or Updating Examples

- [x] The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- [x] Make sure the linting passes by running `pnpm build && pnpm lint`.
See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

Co-authored-by: Sam Ko <sam@vercel.com>
2024-12-17 01:24:53 +00:00
Sam Ko 90cd4e0635 examples(with-supabase): fix action type error (#72783)
## Why?

There is a type issue with one of the form actions.

```
app/(auth-pages)/sign-up/page.tsx:42:25 - error TS2322: Type '(formData: FormData) => Promise<{ error: string; }>' is not assignable to type 'string | ((formData: FormData) => void | Promise<void>) | undefined'.
  Type '(formData: FormData) => Promise<{ error: string; }>' is not assignable to type '(formData: FormData) => void | Promise<void>'.
    Type 'Promise<{ error: string; }>' is not assignable to type 'void | Promise<void>'.
      Type 'Promise<{ error: string; }>' is not assignable to type 'Promise<void>'.
        Type '{ error: string; }' is not assignable to type 'void'.

42           <SubmitButton formAction={signUpAction} pendingText="Signing up...">
```

- x-ref: https://github.com/vercel/next.js/discussions/72778
2024-11-13 14:19:19 -08:00
Ivan Vasilov 703d276ecb examples: Update with-supabase to be compatible with Nextjs 15 (#71631)
Co-authored-by: Lee Robinson <me@leerob.io>
2024-10-22 13:10:04 -05:00
Bobbie Soedirgo 9e56a92b3b examples(with-supabase): typo on env file name (#69291)
### What?

Minor typo on the env file name

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2024-09-16 20:13:03 +00:00
Jonathan Summers-Muir 9bf0148094 chore/ examples use-supabase | update rate limit note (#69423)
- update rate limit note

<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2024-09-16 20:10:48 +00:00
sekai 25c114e507 fix: button className in with_supabase example (#70121)
fix: https://github.com/vercel/next.js/issues/69525

## What 

I fixed an issue in the with-supabase example where duplicate className
in deploy-button.tsx was causing a Tailwind CSS error.

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2024-09-16 19:08:35 +00:00
Terry Sutton 5493d873ab Remove stores params (#69796)
Remove stores param as new integration does not support initializing a
schema. This change basically reverts back to the url that was used
prior to the new integration last week, which still works just fine.

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2024-09-12 21:06:50 +00:00
Lee Robinson b9b9d68e67 examples: Supabase follow up fixes (#69392) 2024-09-03 22:02:01 -05: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
Jordi Enric 6afe80efc2 examples: Improve Supabase example login (#69066)
Co-authored-by: Lee Robinson <me@leerob.io>
2024-08-21 10:35:11 -05:00
Mustafa Ekrem KENTER dab1c320bf docs: Update cookie handling for Supabase SSR package (#67413)
Co-authored-by: Lee Robinson <me@leerob.io>
2024-07-21 10:31:55 -05:00
Terry Sutton fe0368f3c9 Prepare for easier shadcn ui install (#66469)
### What?
Installing shadcn/ui after installing this example was a bad experience.
Running `npx shadcn-ui@latest init` overwrites existing files causing
errors and a confusing start.
 
This allows a installing shadcn/ui without these issues.

Co-authored-by: Sam Ko <sam@vercel.com>
2024-06-20 01:42:36 -07: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
Jon Meyers 1da90c2756 Clean up with-supabase example (#61799)
### What?

[1] Clean up `with-supabase` example following patterns from @leerob's
recent video on authentication
[2] Add images to matcher to reduce number of times a session is
refreshed
[3] Move instantiation of `cookieStore` into Supabase server helper

### Why?

[1] Make template easier to understand and use
[2] Reduce likelihood users will receive Auth Rate Limit Exceeded error
[3] Makes creating a Supabase client much simpler in Server Components,
Route Handlers and Server Actions

### How?

[1] Refactor middleware and its helper function
[2] Add image extensions to middleware matcher
[3] Call `cookies()` function from `createClient` helper - this should
still be in the [same execution
context](https://nextjs.org/docs/messages/dynamic-server-error) and
appears to work from my testing, but would be good to get the 👍 from
someone at Vercel
2024-02-08 19:07:57 +00:00
theItalianDev 29e7227362 enhancement(with-supabase): replace getSession() with getUser() (#61564)
### What?
Enhancement of _with-supabase example_. Replacing in **middelware.ts**,
**supabase.auth.getSession()** with **supabase.auth.getUser()**

### Why?
**Never trust supabase.auth.getSession() inside server code such as
middleware**. It isn't guaranteed to revalidate the Auth token.
**It's safe to trust getUser()** because it sends a request to the
Supabase Auth server every time to revalidate the Auth token.

[Setting up Server-Side Auth for
Next.js](https://supabase.com/docs/guides/auth/server-side/nextjs)
2024-02-05 00:24:39 +00:00
Taishi f000352723 upgrade @types/react-dom to v18.2.18 to import useFormState for server actions in with-supabase example (#60822)
### Adding or Updating Examples

I can't import `useFormState` from `react-dom` with
`@types/react-dom@18.2.5`, so I upgrade it to the latest version of it.

---------

Co-authored-by: Sam Ko <sam@vercel.com>
2024-01-19 04:19:11 +00:00
Steven 4466ba436b chore(examples): use default prettier for examples/templates (#60530)
## Description
This PR ensures that the default prettier config is used for examples
and templates.

This config is compatible with `prettier@3` as well (upgrading prettier
is bigger change that can be a future PR).

## Changes
- Updated `.prettierrc.json` in root with `"trailingComma": "es5"` (will
be needed upgrading to prettier@3)
- Added `examples/.prettierrc.json` with default config (this will
change every example)
- Added `packages/create-next-app/templates/.prettierrc.json` with
default config (this will change every template)

## Related

- Fixes #54402
- Closes #54409
2024-01-11 16:01:44 -07:00
Ankit Kashyap 4b68d55b39 examples: Supabase rename .env.local.example to .env.example (#59984) 2023-12-27 22:47:45 -06:00
Jon Meyers 4462354da1 Fix: Add matcher for middleware (#59651)
### What?
- exclude assets from middleware

### Why?
- avoid refreshing session logic running unnecessarily

### How?
- export matcher config from middleware

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-12-18 09:40:44 -08:00
Sean Gray f5f0767ee5 examples: update Geist font path (#58349) 2023-11-15 22:58:44 -06:00
Jon Meyers c3bf735263 Chore: refactor to use server actions in with-supabase example (#57858)
### What?
[1] Use Server Actions for auth
[2] Use Geist font
[3] Address warning about `metadataBase` in console

### Why?
[1] The co-location of Login page and authentication logic is simpler for beginners
[2] Looks nice
[3] Avoid confusing people with the starter template printing warnings

### How?
[1] Refactor Route Handlers to Server Actions
[2] Install font and set to `html`
[3] Explicitly declare the default value for `metadataBaseUrl`
2023-11-01 14:58:33 +00:00
Jon Meyers 75958bbc46 Chore: simplify with-supabase example (#57562)
### What?

[1] Simplify example
[2] Refactor `delete` method to use `cookies.set`

### Why?

[1] Make it easier to follow
[2] Fix build errors

### How?

[1] Adding comments and abstracting code into helper functions
[2] Setting cookie to empty value when removed

---------

Co-authored-by: Lee Robinson <me@leerob.io>
2023-10-31 18:33:55 -05:00
Kunall Banerjee c380d91562 docs: fix broken link to demo (#57229)
<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->

Nothing too crazy, just pointing the demo to the right URL. The previous
URL is dead/unreachable.

💖
2023-10-26 20:14:08 -05:00
ChanHui 8d45aa9bfb update @types/react version in examples (#57259)
### What?
When I ran `npx create-next-app --example with-turbopack` and installed
dependencies using `yarn`, I found an typescript error(`'SomeComponent'
cannot be used as a JSX component.`).

<img
src="https://github.com/vercel/next.js/assets/51700274/f6c7e478-c0b1-4ea2-996f-4c0c78e3bb4b"
width=400 />

and I realized that the bug is due to the version of
@types/react(18.0.x).
you can check this issue on
[here](https://github.com/vercel/next.js/issues/42292#issuecomment-1594351684)
too.

### Why?
It seems that there is an error occurring in the @types/react version
18.0.x.

### How?
It would be good to change the @types/react version to 18.2.8 in the
next.js examples.

I think this change will resolve [this
issue](https://github.com/vercel/next.js/issues/55080#issue-1884846177)
[NestJS
documentation](https://nextjs.org/docs/app/building-your-application/configuring/typescript#async-server-component-typescript-error)
also states to upgrade the version.

Co-authored-by: Lee Robinson <me@leerob.io>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-10-26 19:52:08 -05:00
Jon Meyers b9dd6c4ff6 Fix: Call cookies function from route to flag as dynamic (#57494)
### What?

Move calling the `cookies` function up to the route

### Why?

This flags the route as `dynamic`, meaning we don't need to explicitly declare `export const dynamic = 'force-dynamic'`

### How?

Passing the returned `cookieStore` into Supabase helper functions, rather than the `cookies` function itself
2023-10-26 16:18:17 +00:00
Jon Meyers 4bc549bf95 Fix: catch expected error in with-supabase example (#57378)
### What?

[1] Use camelCase for SVG properties
[2] Catch expected error in cookie functions

### Why?

[1] Prints error to the console
[2] If the cookies `set` or `delete` methods are called in a Server Component, an error is thrown

### How?

[1] Change property names from kebab-case to camelCase
[2] Catch error
2023-10-26 04:37:32 +00:00
Jon Meyers d0e92b19af chore: Refactor with-supabase example to use ssr package (#57100)
### What?

[1] Refactors `with-supabase` example to use new `@supabase/ssr` package
[2] Makes landing page dynamic steps to connect Next.js to Supabase
[3] Fixes a range of small bugs

### Why?

[1] Simplifies creating a Supabase client
[2] People were not understanding how to connect this template to Supabase
[3] People don't like bugs

### How?

[1] Declares a separate `createClient` function for client and server. Client version is used in Client Components, server version is used every where else - Server Components, Route Handlers, Server Actions, Middleware
[2] Makes landing page a dynamic list of next steps to guide the user to success
[3] Writing code to squash the bugs!
2023-10-23 23:34:10 +00:00
leung018 66597be8a7 Add .yarn/install-state.gz to .gitignore (#56637)
### Reason for making this change
https://yarnpkg.com/getting-started/qa#:~:text=yarn%2Finstall%2Dstate.,your%20workspaces%20all%20over%20again.
In the official documentation of `yarn`, it is stated that `.yarn/install-state.gz` is an optimization file that developer shouldn't ever have to commit. However, currently, when running `create-next-app`, `.yarn/install-state.gz` is being commited.

### Remaining work
I apologize for only modifying one template initially to initiate the discussion first.

If this change is agreed upon,  it should be synchronized with other `.gitignore` templates. Would it be possible to follow a similar approach as in https://github.com/vercel/next.js/pull/47241? I would appreciate any assistance in syncing this change.
2023-10-18 16:34:48 +00:00
Surav Shrestha 869d93c777 docs: fix several typos (#56788)
`Enviroment -> Environment`

---------

Co-authored-by: Steven <steven@ceriously.com>
2023-10-13 15:40:14 -04:00
Jonathan Summers-Muir 06705a4815 Chore/update with supabase demo deploy button (#52483)
### What?

- added correct deploy button urls
  - uses new supabase integration
- updated readme for local development, more clearer instructions
- added opengraph image

### Why?

- old supabase integration is buggy
- readme is more clear for local development

---------

Co-authored-by: Steven Tey <stevensteel97@gmail.com>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-09-27 17:36:17 -07:00
Mayank 764f6c8ec7 Update dependencies in examples (#55993)
Co-authored-by: Snyk bot <19733683+snyk-bot@users.noreply.github.com>
2023-09-26 22:34:44 +00:00
Gonzalo a66aca1e67 EXAMPLE: fix with-supabase signup button style (#53531)
### What?
Fix example `with-supabase` https://github.com/vercel/next.js/tree/canary/examples/with-supabase signup button

### Why?
Signup button text color is not the right one so the developer is not able to see the text.

### How?
Updated the style using tailwind as it is what we are using in the example.

Before:
![image](https://github.com/vercel/next.js/assets/1652286/269c3be1-70ee-4b92-9161-4d1c35cbd01c)

After (Fixed):
![image](https://github.com/vercel/next.js/assets/1652286/3aa6af87-7958-470d-bf05-d1187963e792)
2023-08-04 20:36:52 +00:00
Jon Meyers 269114b5cc examples: implement server side auth with supabase (#53372)
### What?

1. Refactor `with-supabase` example to use server-side auth

### Why?

1. It is the recommended path for Next.js, and can serve as an example for the authentication docs

### How?

1. Move authentication methods from Client Component to Route Handlers
2023-08-02 16:41:05 +00:00
Jon Meyers 2b49741308 examples: export force-dynamic from all dynamic routes (#52916)
### What?

Stop `with-supabase` template from throwing errors on build

### Why?

Dynamic Routes now fail the build, rather than console.logging an error

### How?

Export the following from any routes that use the `cookies` function

```
export const dynamic = "force-dynamic";
```

Install `encoding` as a dev dependency until this is fixed downstream
2023-07-20 13:33:43 +00:00
Francesco Sansalvadore b636d3d755 [examples] Update styling for with-supabase example (#51751)
### Adding or Updating Examples

Improve styling for the `with-supabase` example.

<img width="2048" alt="Screenshot 2023-06-24 at 15 07 46"
src="https://github.com/vercel/next.js/assets/25671831/0bba9a0a-a660-411e-b960-ea933aa2750a">
<img width="2048" alt="Screenshot 2023-06-24 at 15 07 58"
src="https://github.com/vercel/next.js/assets/25671831/00f70c8b-e6ea-47ac-8a2e-829b4b808280">

---------

Co-authored-by: Lee Robinson <me@leerob.io>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-06-28 21:11:13 -07:00
Jon Meyers 4dae429e8c examples: add missing supabase-js dependency for with-supabase example (#51703)
### What?

Adds `supabase-js` as dependency for `with-supabase` example

### Why?

`with-supabase` example is missing `supabase-js` dependency, which is a
peer dependency of `@supabase/auth-helpers-nextjs`

### How?

Adds `supabase-js` to `examples/with-supabase/package.json`

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-06-23 11:02:50 -07:00
Jon Meyers 0674d95d2e examples: improve with-supabase example (#51442) 2023-06-21 15:37:03 -07:00