AuthApiError: Error sending recovery email

i made this code for send a recovery email for reset password and i got this 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;
}
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;
}
err cause : undefined details : undefined hint : undefined message : "Error sending recovery email" name : "AuthApiError" status : 500 Symbol(next.console.error.digest) : "NEXT_CONSOLE_ERROR" Symbol(next.console.error.type) : "error" [[Prototype]] : Object
2 Replies
tomaspozo
tomaspozo3w ago
check your auth logs on your supabase dashboard
3Froto
3FrotoOP3w ago
oh thanks now i can see the reason

Did you find this page helpful?