Skip to content

Sign Resend webhooks with Svix and add the Webhooks API - #396

Open
ctate wants to merge 5 commits into
mainfrom
ctate/sign-resend-webhooks-e67ff5
Open

ctate wants to merge 5 commits into
mainfrom
ctate/sign-resend-webhooks-e67ff5

Conversation

@ctate

@ctate ctate commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

The Resend emulator dispatched email, domain, and contact events, but
nothing could subscribe to them, and deliveries would have carried
GitHub's X-Hub-Signature-256 header. Resend delivers webhooks through
Svix, so receivers verify them with resend.webhooks.verify() or the
svix library.

- Deliveries carry svix-id (a msg_ id per delivery), svix-timestamp in
  seconds, and svix-signature "v1,<base64 HMAC-SHA256>" over
  "<id>.<timestamp>.<body>", keyed with the base64-decoded part of the
  whsec_ signing secret.
- POST, GET, PATCH, and DELETE /webhooks follow Resend's Webhooks API.
  Create returns the signing secret, retrieve includes it, and list
  leaves it out. A webhook receives only its subscribed events, and a
  disabled one receives none.
- resend.webhooks in seed config registers endpoints. Without events, a
  seeded webhook subscribes to every event the emulator sends. Without
  signing_secret, it gets one derived from the endpoint URL, so the
  secret survives resets and restarts.

Co-authored-by: Xiro The Dev <140150717+xirothedev@users.noreply.github.com>
@vercel

vercel Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
emulate Ready Ready Preview, v0 Nov 15, 2026 6:07am UTC

@vercel-internal-security-reviewer

Copy link
Copy Markdown

Security review details

name: "resend",
register(app: Hono<AppEnv>, store: Store, webhooks: WebhookDispatcher, baseUrl: string, tokenMap?: TokenMap): void {
webhooks.setHeaderFactory(svixWebhookHeaders);

@vercel vercel Bot Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After an adapter restarts from persisted state, enabled Resend webhooks remain visible through the API but silently receive no events because their dispatcher subscriptions are not restored.

Fix on Vercel

This branch was successfully deployed

1 active deployment
Preview — 5592d8e9 Deployed Nov 15, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant