From bf65b7d0c37cfcc9042c20d47142eeafafed3bc2 Mon Sep 17 00:00:00 2001 From: Callyse Date: Sun, 16 Jul 2023 14:17:46 +0200 Subject: [PATCH] Update nextjs.mdx --- apps/docs/pages/guides/auth/auth-helpers/nextjs.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/docs/pages/guides/auth/auth-helpers/nextjs.mdx b/apps/docs/pages/guides/auth/auth-helpers/nextjs.mdx index 65eb562be1c..12a7b8e319c 100644 --- a/apps/docs/pages/guides/auth/auth-helpers/nextjs.mdx +++ b/apps/docs/pages/guides/auth/auth-helpers/nextjs.mdx @@ -79,7 +79,7 @@ NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key When using the Supabase client on the server, you must perform extra steps to ensure the user's auth session remains active. Since the user's session is tracked in a cookie, we need to read this cookie and update it if necessary. -In Next.js Server Components, you can read a cookie, but you can't write back to it. Middleware on the other hand, allow you to both read and write to cookies. +In Next.js Server Components, you can read a cookie, but you can't write back to it. Middleware, on the other hand, allows you to both read and write to cookies. Next.js [Middleware](https://nextjs.org/docs/app/building-your-application/routing/middleware) runs immediately before each route is rendered. We'll use Middleware to refresh the user's session before loading Server Component routes.