From 4778afa83f98e6f05e866c30947dd52cab9d0f1c Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Sat, 18 Oct 2025 01:32:50 +0000 Subject: [PATCH] Add timeout to updatePassword to avoid hanging cgen-bc6076bfab7c4cd3a485982894412135 --- client/contexts/AuthContext.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/client/contexts/AuthContext.tsx b/client/contexts/AuthContext.tsx index 1e1873ae..5f039c70 100644 --- a/client/contexts/AuthContext.tsx +++ b/client/contexts/AuthContext.tsx @@ -860,9 +860,11 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ try { await supabase.auth.getSession(); } catch {} - const { data, error } = await supabase.auth.updateUser({ - password: newPassword, - }); + const { data, error } = await withTimeout( + supabase.auth.updateUser({ password: newPassword }), + 8000, + "Password update timed out" + ); if (error) throw error; if (data?.user) { aethexToast.success({