Free checker
Paste any mix of package.json, components, route handlers, server actions, middleware.ts / proxy.ts or getServerSideProps. Click check.
Before โ after (what --fix does)
Before ยท auth-helpers
import { cookies } from 'next/headers'import { createServerComponentClient } from '@supabase/auth-helpers-nextjs' export default async function Page() { const cookieStore = cookies() const supabase = createServerComponentClient({ cookies: () => cookieStore, })
After ยท @supabase/ssr
import { createClient } from '@/lib/supabase/server' export default async function Page() { const supabase = await createClient() // lib/supabase/server.ts (generated): // createServerClient(url, key, { cookies: { // getAll: () => cookieStore.getAll(), // setAll: (c) => { try { c.forEach(...) } catch {} } } })
The pack also writes lib/supabase/client.ts, server.ts, proxy.ts (session refresh with getClaims() and cache headers), a Pages Router helper, and a middleware.ts or proxy.ts entry that matches your Next.js version.
Why not just do it by hand?
Silent sign-outs
Return the wrong response from middleware or refresh in two places and users are logged out at random. The templates follow Supabase's exact proxy pattern.Next 15 vs 16
proxy.ts on Next โค15 is never called; middleware.ts on 16 is renamed. The CLI reads your next version and writes the right one.Async cookies
cookies() is async in Next 15+. Every server call becomes await createClient(), but only inside async functions (the rest are flagged, never broken).getSession() on the server
Supabase says never trust it in server code. Every server-sidegetSession() is flagged with the getClaims() replacement.Supabase Auth Helpers โ @supabase/ssr Migration Pack
- Codemod CLI (
node cli.js . --fix): rewrites browser, server-component, route-handler, server-action and Pages Router clients; moves types to supabase-js; cleanscookies()imports; updates package.json. .bak backups,--dry-rundiff. - Generated templates (TS + JS): client, server, proxy/updateSession, Pages Router server-props, middleware/proxy entry. TS templates type-check against @supabase/ssr 0.12.7.
- CI gate + reports:
--ciexits 1 until you're done,--json,--mdchecklist report. - 16-step migration checklist + 20 regression tests + fixtures, every rule linked to the Supabase docs.
Instant download: after checkout you're redirected straight to your private download page. Zero dependencies, runs locally on Node 18+.
Get the 10-Second Fix Bundle โ $9Questions or problems with your download? Contact us via GitHub issues.
Methodology
The free checker runs entirely in your browser: it matches the text you paste against rules written from the official changelogs and migration guides. Nothing is uploaded. The paid deliverables are files (codemod, templates, checklist) unlocked right after checkout; each pack is tested against the fixtures shipped inside it.
Sources and free assets: GitHub release ยท GitHub Wiki guide. Contact and support: open a Discussion at thorp-tools.pages.dev.
Last Updated:
FAQ
Is @supabase/auth-helpers-nextjs deprecated?
Yes. The npm package (latest 0.15.0) is marked "Package no longer supported", and Supabase consolidated all auth-helpers packages into @supabase/ssr. Supabase recommends migrating because fixes and features only land in @supabase/ssr.
What replaces createClientComponentClient and createServerComponentClient?
createClientComponentClient becomes createBrowserClient; createServerComponentClient, createRouteHandlerClient and createServerActionClient become createServerClient with a cookies object that implements getAll and setAll; createMiddlewareClient becomes createServerClient inside an updateSession() proxy/middleware that calls supabase.auth.getClaims().
Can I keep both packages installed during the migration?
Supabase says not to use auth-helpers-nextjs and @supabase/ssr in the same application, because it causes authentication issues. Migrate every file, then uninstall the helpers.
Does it support the Pages Router?
Yes. createPagesBrowserClient becomes the browser client, and createPagesServerClient / createServerSupabaseClient become a createServerClient that reads cookies with parseCookieHeader and writes them with serializeCookieHeader.
What about Next.js 16 and proxy.ts?
Next.js 16 renamed middleware.ts to proxy.ts (export async function proxy). On Next.js 15 and earlier a proxy.ts is never called, so sessions never refresh. The checker flags both mistakes, and the pack writes the right file for your Next.js version.
Should I still use getSession() on the server?
No. Supabase: never trust getSession() in server code such as the proxy, because it reads the cookie without revalidating it. Use getClaims() to protect pages and data, or getUser() when you need a fresh user record.
Is my code uploaded anywhere?
No. This free checker runs entirely in your browser. The paid pack is a zero-dependency Node.js CLI that runs locally on your repo.
How do I get the pack after paying?
Instantly: after checkout Stripe redirects you to your private download page (the unlock key is in the link). Save the link; it is your copy.
Free starter files: GitHub Releases