Threads
Loading user profile...
Use three separate Supabase clients: (1) browser client for client components, (2) server client for Server Components and API routes (uses cookies), (3) admin client with service role key for operations that bypass RLS. The server client is the one most people miss — you need it to maintain the auth session in Server Components.