'use client'; import { createBrowserClient } from '@supabase/ssr'; import { supabaseAuthCookieName } from './cookie-name'; export function createSupabaseBrowserClient() { return createBrowserClient( process.env.NEXT_PUBLIC_SUPABASE_URL!, process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!, // Explicit (equals the default it derives from the public URL) so the // server clients can pin the identical name while talking to the internal // API host. Keeps both sides on the same auth cookie. { cookieOptions: { name: supabaseAuthCookieName() } }, ); }