
Supabase just dropped a new npm package called @supabase/server (version 0.1.4, MIT license) that promises to handle all the tedious authentication setup for server-side rendering, API routes, and edge functions. The goal? To let developers stop writing the same cookie-syncing, session-refreshing, client-passing code over and over.
It provides a higher-order function called withSupabase. You pass it an access policy—like allow: 'user' to only let logged-in users through—and the returned handler attaches a pre-configured Supabase client to ctx.supabase. From there, your business logic can just call ctx.supabase.from('todos').select() and get on with it.
Supabase co-founder Paul Copplestone announced the release on X, calling it an early version and asking for testers and feedback. He also mentioned the team is working on framework-specific adapters.
https://twitter.com/kiwicopple/status/2046508274405793950
Until now, integrating Supabase with SSR frameworks like Next.js meant developers had to manually handle cookie reading, session refreshing, and client passing—a pain point the community has been complaining about for ages. This move follows a broader trend of backend-as-a-service platforms streamlining developer workflows, similar to how OpenAI's Agents SDK got a major upgrade for building persistent AI assistants recently.