mirror of
https://github.com/supabase/supabase.git
synced 2026-12-03 23:18:57 +00:00
## What Adds internal cross-links to docs guides ## Testing - Prettier passes on the changed lines. - Docs build passes (`pnpm build --filter=docs`). - Docs link e2e run locally against the production build for every changed page across this PR --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
42 lines
1.8 KiB
Plaintext
42 lines
1.8 KiB
Plaintext
---
|
|
title: 'Server-Side Rendering'
|
|
subtitle: 'How SSR works with Supabase Auth.'
|
|
---
|
|
|
|
SSR frameworks move rendering and data fetches to the server, to reduce client bundle size and execution time.
|
|
|
|
Supabase Auth is fully compatible with SSR. You need to make a few changes to the configuration of your [Supabase client](/docs/reference/javascript/introduction), to store the user session in cookies instead of local storage. After setting up your Supabase client, follow the instructions for any flow in the How-To guides.
|
|
|
|
<Admonition type="note">
|
|
|
|
Make sure to use the PKCE flow instructions where those differ from the implicit flow instructions. If no difference is mentioned, don't worry about this.
|
|
|
|
</Admonition>
|
|
|
|
## `@supabase/ssr`
|
|
|
|
We have developed an [`@supabase/ssr`](https://www.npmjs.com/package/@supabase/ssr) package for setting up the Supabase client. This package is currently in beta. Adoption is recommended but be aware that the API is still unstable and may have breaking changes in the future.
|
|
|
|
## Framework quickstarts
|
|
|
|
<div className="grid grid-cols-[repeat(auto-fit,minmax(300px,1fr))] gap-6 mb-6 not-prose">
|
|
<Link
|
|
href="/guides/auth/server-side/creating-a-client?queryGroups=framework&framework=nextjs"
|
|
passHref
|
|
>
|
|
<GlassPanel title="Next.js" icon="/docs/img/icons/nextjs-icon">
|
|
Automatically configure Supabase in Next.js to use cookies, making your user and their session
|
|
available on the client and server.
|
|
</GlassPanel>
|
|
</Link>
|
|
<Link
|
|
href="/guides/auth/server-side/creating-a-client?queryGroups=framework&framework=sveltekit"
|
|
passHref
|
|
>
|
|
<GlassPanel title="SvelteKit" icon="/docs/img/icons/svelte-icon">
|
|
Automatically configure Supabase in SvelteKit to use cookies, making your user and their
|
|
session available on the client and server.
|
|
</GlassPanel>
|
|
</Link>
|
|
</div>
|