try {
const { data, error } = await supabase.auth.resetPasswordForEmail(email, {
redirectTo: 'http://localhost:3000/auth/update-password',
});
if (error) throw error;
return data;
} catch (error: any) {
console.error('Full error object:', JSON.stringify(error, null, 2));
console.error('Error details:', {
name: error.name,
status: error.status,
message: error.message,
hint: error.hint,
details: error.details,
cause: error.cause,
});
throw error;
}
try {
const { data, error } = await supabase.auth.resetPasswordForEmail(email, {
redirectTo: 'http://localhost:3000/auth/update-password',
});
if (error) throw error;
return data;
} catch (error: any) {
console.error('Full error object:', JSON.stringify(error, null, 2));
console.error('Error details:', {
name: error.name,
status: error.status,
message: error.message,
hint: error.hint,
details: error.details,
cause: error.cause,
});
throw error;
}