Repository navigation
fix(site): send portal sign-in codes and magic links via Cloudflare Email Sending - #821
Merged
Merged
Conversation
…mail Sending 656d9e6 stubbed out sendCodingCatEmail to stop automated outreach, which also silently stopped sign-in codes and magic links: Better Auth ignored the false return, so /portal/[token] and /sign-in reported "code sent" while nothing was sent. Sign-in emails now go through the EMAIL binding (Cloudflare Email Sending, codingcat.dev is onboarded) from noreply@codingcat.dev and throw on failure, so the UI shows an error instead of a phantom success. Outreach email stays disabled. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
⚡ Cloudflare Worker Preview Ready!
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Sign-in codes on
/portal/[token](e.g. https://codingcat.dev/portal/spt_b0e6532361bf4052) and/sign-innever arrive. 656d9e6 stubbedsendCodingCatEmailDetailedto returnok: falseto stop automated outreach. The Better Auth OTP and magic-link handlers ignored that return value, so the UI said "Sent a 6-digit verification code" while nothing was sent.Fix
sendCodingCatAuthEmailinlib/email.tssends through theEMAILbinding (Cloudflare Email Sending;codingcat.devis onboarded and enabled) fromnoreply@codingcat.dev.sendVerificationOTPandsendMagicLinkinlib/auth.tsuse it.sendCodingCatEmail) stays disabled.Verification
wrangler email sending send --from noreply@codingcat.dev→ queued.astro check: no new errors in the touched files (remaining errors are the pre-existing missing Worker types).Made with Cursor