The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
add session examples for client and server components
Jon Meyers388c14a59886
diff --git a/apps/docs/pages/guides/auth/auth-helpers/nextjs-server-components.mdx b/apps/docs/pages/guides/auth/auth-helpers/nextjs-server-components.mdxindex 55f654bc979..5cad755ec61 100644--- a/apps/docs/pages/guides/auth/auth-helpers/nextjs-server-components.mdx+++ b/apps/docs/pages/guides/auth/auth-helpers/nextjs-server-components.mdx@@ -363,6 +363,8 @@ export default function NewPost() {</TabPanel></Tabs>+> check out [this example](https://github.com/supabase/supabase/tree/master/examples/auth/nextjs/app/supabase-provider.tsx) for making the user's session available to all Client Components.+### Server ComponentsIn order to use Supabase in Server Components, you need to have implemented the `middleware.ts` steps above π@@ -420,6 +422,8 @@ export default async function ServerComponent() {</TabPanel></Tabs>+> check out [this example](https://github.com/supabase/supabase/tree/master/examples/auth/nextjs/app/page.tsx) for redirecting unauthenticated users - protected pages.+### Route HandlersIn order to use Supabase in Route Handlers, you need to have implemented the `middleware.ts` steps above π@@ -478,7 +482,7 @@ export async function GET() {</TabPanel></Tabs>-> Check out [this repo](https://github.com/supabase/supabase/tree/master/examples/auth/nextjs) for a full example including [authentication](https://github.com/supabase/supabase/tree/master/examples/auth/nextjs/app/login.tsx) and [realtime](https://github.com/supabase/supabase/tree/master/examples/auth/nextjs/app/realtime-posts.tsx).+> Check out [this repo](https://github.com/supabase/supabase/tree/master/examples/auth/nextjs) for a full example including [authentication](https://github.com/supabase/supabase/tree/master/examples/auth/nextjs/app/login.tsx), [realtime](https://github.com/supabase/supabase/tree/master/examples/auth/nextjs/app/realtime-posts.tsx) and [protected pages](https://github.com/supabase/supabase/tree/master/examples/auth/nextjs/app/page.tsx).export const Page = ({ children }) => <Layout meta={meta} children={children} />