The browser keeps a Supabase client for direct Realtime and token refresh; the better-supabase relay serves Realtime only during support sessions.
better-supabase 0.16 adds realtimeRelay and useSessionWatch for apps that keep the session out of the browser. A relay holds one server-sent event stream per tab per topic on Vercel functions, reconnecting every few minutes, so its cost and database load grow with tabs times topics. Direct Realtime multiplexes every topic over one websocket per tab and runs on Supabase. Without a browser client, nothing refreshes the access token of an idle tab.
auth-state-sync-island (claims change refreshes the router, sign-out loads /login with the reason)./api/realtime (realtimeRelay) stays for support sessions: the topic hook joins through the relay when the server-rendered access state says a support session is active, since the admin's own token must not join the user's topics.useSessionWatch and sessionStatusRoute are not used; running them next to a browser client is unsupported.refresh_token_reuse_interval stays 10 seconds.Last updated on