refactor(integrations): verify resend webhooks with the shared standard webhooks check
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 58/100
- Tipo di issue
- Refactoring
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- TypeScript
- Stelle
- 13
- Fork
- 2
- Merge medio
- 5h 20m
- PR unite (30g)
- 287
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di eddiejaoude/StackDash
-
area: integrations documentation priority: P2 size: XS
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
eddiejaoude/StackDash#798 ·
I maintainer di solito rispondono entro 1 giorno
-
area: ops documentation priority: P3 size: XS
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
eddiejaoude/StackDash#796 ·
I maintainer di solito rispondono entro 1 giorno
-
area: docs documentation impact: low priority: P3 size: XS
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
eddiejaoude/StackDash#790 ·
I maintainer di solito rispondono entro 1 giorno
-
area: ops bug impact: low priority: P3 size: XS
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
eddiejaoude/StackDash#785 ·
I maintainer di solito rispondono entro 1 giorno
-
area: connections enhancement impact: low priority: P3 size: XS
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
eddiejaoude/StackDash#768 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di eddiejaoude/StackDash
Issue simili
-
bot:ai-assisted component:midnight-js status:untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
midnightntwrk/midnight-js#1790 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
area:vscode bug has repro platform:macos platform:vscode regression
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
anthropics/claude-code#113502 ·
-
Add: Rajdhani TV HDApertacheck:passed streams:add
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno
-
effort/l priority/p1 risk/high triage/core
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
iflytek/skillhub#1188 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno