Repository navigation
Conversation
- 接入 Resend 邮件通道(EMAIL_PROVIDER=resend,RESEND_API_KEY) - Argon2 迭代 3->2,适配 Workers Free 10ms CPU 上限(改密双哈希不超限) - wrangler 配置:主账号资源(auth.otscup.com 域名、xid-db/kv/r2/queues) - console 经 core service binding 转发,CANONICAL_HOST 改为 auth.otscup.com - 移除 Analytics Engine binding(账号未启用)与超限 cron triggers - .gitignore 加入 .xid-secrets Signed-off-by: otscup <otscup@gmail.com>
This branch has not been deployed
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.
Summary
Self-hosted deployments on Cloudflare Workers Free cannot use the Email Service (
send_emailbinding) for arbitrary recipients. This adds aResendEmailProviderimplementing the existingEmailProviderabstraction, so operators can send transactional email via the Resend HTTPS API instead.Changes
packages/types/src/env.ts: add'resend'toEmailProviderNameapps/server/worker/queues/email.ts: newResendEmailProviderclass +resolveEmailProviderhandlesEMAIL_PROVIDER=resendapps/server/worker/env.d.ts: declare optionalRESEND_API_KEYWorkers SecretConfiguration
The API key never touches code or D1; failures throw (fail-closed) and flow into the existing DLQ/persistence path.
Test
Deployed on a live Workers Free instance: password-reset and OTP emails delivered via Resend.
Signed-off-by: otscup otscup@gmail.com