Replies: 1 comment
-
|
This is exactly what the Cloudflare adapter has been missing. Running into that 503 error on magic-link logins in production is a massive headache, and I was just looking into having to wire up a custom site plugin to get auth working reliably for my own project. Leveraging the native send_email binding is absolutely the right move here. Keeping it zero-dependency without needing to juggle third-party API keys (like Resend or Postmark) just to get basic platform notifications and invites out the door is a huge win for the developer experience. Also, relying on the cloudflare:workers env module to cleanly bypass the out-of-bounds execution context issues is a great architectural catch. Really looking forward to seeing the PR land. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem: Production deployments on Cloudflare Workers — the platform
@emdash-cms/cloudflaretargets — have no email provider. The only built-inemail:deliverhook is the dev console stub, so magic-link login returns 503EMAIL_NOT_CONFIGURED, invites are copy-link-only, and notifications are skipped. Full analysis with code pointers in issue #1431.Proposal: A
cloudflareEmail()plugin factory in@emdash-cms/cloudflare/plugins(same style asvectorizeSearch):email:deliveras an exclusive hook (capabilityhooks.email-transport:register), selectable under Settings → Email — exactly the flow theEmailNotConfiguredErrormessage describes ("Install and activate an email provider plugin, then select it in Settings > Email"),send_emailWorker binding (Cloudflare Email Sending) — no API keys, no external service,cloudflare:workersenv, since hooks run without request context (avoids the cached-env workaround thatvectorizeSearchneeds),Implementation: PR ready (TDD'd: 8 unit tests with injectable env loader, changeset) — submitted in parallel; happy to adjust based on feedback. Out of scope by intent: BCC/attachments (the pipeline's
EmailMessagedoesn't model them yet) and auto-selection as provider (selection stays an explicit admin action).Use case: lifespan.solutions went to production on Workers this week; the magic-link login needed to bootstrap a passkey on the new domain failed with the 503. We bridged it with a site plugin — but every Cloudflare deployment hits this wall.
Beta Was this translation helpful? Give feedback.
All reactions