Add timeout to updatePassword to avoid hanging

cgen-bc6076bfab7c4cd3a485982894412135
This commit is contained in:
Builder.io 2025-10-18 01:32:50 +00:00
parent b011b673a4
commit 4778afa83f

View file

@ -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({