From f4b611c242c3b7bf555b63333adda6223c2bbf49 Mon Sep 17 00:00:00 2001 From: AbdullahM07 Date: Sun, 16 Aug 2026 13:48:42 +0300 Subject: [PATCH] fix(auth): resolve the conflict markers left in the verification OTP path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `74ec3f72` ("patch v0.6.6") committed unresolved merge conflict markers into the `emailOTP` plugin's `sendVerificationOTP`, so `main` stops at `TS1185: Merge conflict marker encountered` and 48 API test files fail to load — esbuild cannot parse the file, and everything importing it through `middleware/auth.ts` dies at transform time. Keeps the fail-loudly side. It is what the `forget-password` branch directly below already does: check `sendMail`'s result and throw SERVICE_UNAVAILABLE rather than tell someone to check their inbox for a code that was never sent. The discarded side is the fire-and-forget behavior v0.6.6 was replacing. No behavior change beyond removing the markers. --- apps/api/src/lib/auth.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/apps/api/src/lib/auth.ts b/apps/api/src/lib/auth.ts index e2d84e811..b4394ed45 100644 --- a/apps/api/src/lib/auth.ts +++ b/apps/api/src/lib/auth.ts @@ -415,9 +415,6 @@ 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: @@ -425,7 +422,6 @@ export const auth = betterAuth({ "email transport. Configure SMTP in Settings → Email.", }); } ->>>>>>> a52e2566 (patch v0.6.6) return; } // Password reset. This replaced the link flow (`sendResetPassword` in the