Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions apps/api/src/lib/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -415,17 +415,13 @@ export const auth = betterAuth({
// types are not enabled, so they fall through and send nothing.
if (type === "email-verification") {
const tmpl = verifyOtpEmailTemplate(otp, { expiresMinutes: 10 });
<<<<<<< HEAD
await sendMail({ to: email, ...tmpl });
=======
if (!(await sendMail({ to: email, ...tmpl }))) {
throw new APIError("SERVICE_UNAVAILABLE", {
message:
"Could not send the verification code — this instance has no working " +
"email transport. Configure SMTP in Settings → Email.",
});
}
>>>>>>> a52e2566 (patch v0.6.6)
return;
}
// Password reset. This replaced the link flow (`sendResetPassword` in the
Expand Down