From ce255b27be7a9c4b9b96635a79bc9a955c0fd95c Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Tue, 30 Sep 2025 23:00:49 +0000 Subject: [PATCH] Ensure Supabase local tokens cleared cgen-5eab9830368347a7a4eb8a5022801489 --- client/contexts/AuthContext.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/client/contexts/AuthContext.tsx b/client/contexts/AuthContext.tsx index 5f7f7cd6..106a9a84 100644 --- a/client/contexts/AuthContext.tsx +++ b/client/contexts/AuthContext.tsx @@ -425,8 +425,11 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ if (typeof window !== "undefined") { try { window.localStorage.removeItem("onboarding_complete"); - window.localStorage.removeItem("supabase.auth.token"); - window.localStorage.removeItem("supabase.auth.refresh_token"); + Object.keys(window.localStorage) + .filter((key) => key.startsWith("sb-") || key.includes("supabase")) + .forEach((key) => { + window.localStorage.removeItem(key); + }); } catch {} } }, []);