refactor(integrations): verify resend webhooks with the shared standard webhooks check
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 58/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
Research direction
Start by reading src/lib/webhooks/standard-webhooks.ts and the Resend verifier in src/lib/adapters/resend/index.ts; this issue is blocked until #515 and #525 are on main. Then review the existing Resend tests and move scheme-level cases to src/lib/webhooks/standard-webhooks.test.ts, keeping Resend header and documented Svix example coverage. Done when Resend delegates verification to the shared check and its unit tests, Playwright spec, lint, and typecheck pass.
Written by the indexing model from the issue text.
Description
Context
Raised by the Fable review of #525 (Polar webhooks, #429), comment 4591332936.
#525 adds src/lib/webhooks/standard-webhooks.ts (verifyStandardWebhook, standardWebhookKey, standardWebhookSignature), the Standard Webhooks check Polar signs with. Resend signs the same way through Svix, only under the svix-id, svix-timestamp, and svix-signature header names. #515 (Resend webhooks, #427) carries its own copy in src/lib/adapters/resend/index.ts (signingKey, svixSignature, verifyWebhook): the same key decoding, signature, and compare-every-entry loop. Once both merge there are two copies of one signature check, which can drift.
The Resend worker asked that the move wait until #515 merges, so this is its own issue rather than part of #525.
Blocked by #515 and #525 (both must be on main).
Plan
- In
src/lib/adapters/resend/index.ts, verify withverifyStandardWebhook(request, key === null ? [] : [key], RESEND_WEBHOOK_HEADERS, now), withkeyfromstandardWebhookKey(secret). - Replace
signingKeyandsvixSignaturewithstandardWebhookKeyandstandardWebhookSignatureinresendWebhookSignatureandcreateWebhook. KeepRESEND_WEBHOOK_HEADERSas Resend's header names, typedStandardWebhookHeaders. - Delete what becomes unused. Keep
RESEND_WEBHOOK_TOLERANCE_SECONDSonly if a caller still needs it, otherwise useSTANDARD_WEBHOOK_TOLERANCE_SECONDS. - Move any scheme-level tests left in
resend/index.test.tstosrc/lib/webhooks/standard-webhooks.test.ts. Keep Resend's own: its header names and the Svix documented example.
Acceptance criteria
- Resend's
verifycallsverifyStandardWebhook; no second HMAC or compare loop remains inresend/index.ts. - Every existing Resend webhook unit test passes unchanged in outcome.
- Playwright:
e2e/webhook-setup-resend.spec.tspasses unchanged. No new e2e is needed, because behavior does not change.
Files and areas
src/lib/adapters/resend/index.ts,src/lib/adapters/resend/index.test.ts,src/lib/webhooks/standard-webhooks.test.ts.- Non-goals: changing Resend's subscriptions, mapping, tolerance, or setup.
Verification
npx vitest run src/lib/adapters/resend src/lib/webhooksnpm run lint,npm run typecheck
Branch: <issue-number>-resend-shared-verifier
Closes with a Closes #<issue-number> footer on the commit or pull request.
Model: anthropic/claude-opus-5-5 | Reasoning effort: not reported by the harness
- Dominant language
- TypeScript
- Stars
- 13
- Forks
- 2
- Avg merge
- 5h 20m
- Merged PRs (30d)
- 287
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from eddiejaoude/StackDash
-
area: integrations documentation priority: P2 size: XS
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
eddiejaoude/StackDash#798 ·
Maintainers usually reply within 1 day
-
area: ops documentation priority: P3 size: XS
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
eddiejaoude/StackDash#796 ·
Maintainers usually reply within 1 day
-
area: docs documentation impact: low priority: P3 size: XS
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
eddiejaoude/StackDash#790 ·
Maintainers usually reply within 1 day
-
area: ops bug impact: low priority: P3 size: XS
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
eddiejaoude/StackDash#785 ·
Maintainers usually reply within 1 day
-
area: connections enhancement impact: low priority: P3 size: XS
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
eddiejaoude/StackDash#768 ·
Maintainers usually reply within 1 day
All issues in eddiejaoude/StackDash
Similar issues
-
bot:ai-assisted component:midnight-js status:untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
midnightntwrk/midnight-js#1790 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
area:vscode bug has repro platform:macos platform:vscode regression
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
anthropics/claude-code#113502 ·
-
Add: Rajdhani TV HDOpencheck:passed streams:add
Difficulty 1/5 Under an hour Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
effort/l priority/p1 risk/high triage/core
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
iflytek/skillhub#1188 · 1 comment ·
Maintainers usually reply within 1 day