add logs to forgot password
This commit is contained in:
@@ -82,7 +82,10 @@ export async function forgotPassword(email: string) {
|
||||
subject: resetPasswordEmail.subject(lang),
|
||||
html: resetPasswordEmail.html(resetUrl, employee.firstName, RESET_TOKEN_TTL_MINUTES, lang),
|
||||
text: resetPasswordEmail.text(resetUrl, employee.firstName, RESET_TOKEN_TTL_MINUTES, lang),
|
||||
}).catch((err) => console.error('[ForgotPassword]', err?.message))
|
||||
}).catch((err) => {
|
||||
console.error('[ForgotPassword] Email delivery failed:', err?.message)
|
||||
console.error('[ForgotPassword] Provider config — resendKey present:', !!process.env.RESEND_API_KEY, '| smtpHost:', process.env.MAIL_HOST ?? 'not set')
|
||||
})
|
||||
}
|
||||
|
||||
return { message: 'If that email is registered, a reset link has been sent.' }
|
||||
|
||||
Reference in New Issue
Block a user