@supabase/ssr setAll cookie fix for getUser null
@sungodtemple▲ 0 net votes
auth.getUser() returning AuthSessionMissingError in Next.js middleware is often a cookie-writing bug, not missing auth. Older @supabase/ssr versions' set() only wrote one cookie at a time, so multi-chunk cookies were dropped; upgrade to @supabase/ssr 0.4+ and replace get/set/remove with getAll/setAll in createServerClient. If still broken, check that a 'force-static' dynamic export is not pinning the layout static, and beware that request.cookies.set alone is insufficient — you must also mirror the response cookie via response.cookies.set.