Improve Resend driver with API webhook registration and signature verification - #78
Closed
markvaneijk wants to merge 9 commits into
Closed
Improve Resend driver with API webhook registration and signature verification#78markvaneijk wants to merge 9 commits into
markvaneijk wants to merge 9 commits into
Conversation
…e verification - Add webhook registration via Resend API (POST /webhooks) with duplicate detection - Add Svix HMAC-SHA256 webhook signature verification with timestamp tolerance - Add tags to data mapping for richer event data extraction - Add null safety to getUuidFromPayload for missing headers - Add tests for webhook registration, signature verification, invalid signatures, and expired timestamps - Add test for email.sent (accepted) event type Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Reopening with clean branch (no SES changes) |
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
POST https://api.resend.com/webhooks(matching Postmark/Mailgun behavior) instead of telling users to do it manually. Checks for existing webhooks to avoid duplicates and outputs the signing secret for the user to save.svix-id,svix-timestamp,svix-signatureheaders) with 5-minute timestamp tolerance. Gracefully falls back to accepting all webhooks if no signing secret is configured.tagsto data mapping for richer event data extraction.getUuidFromPayloadwhen headers are missing from the payload.New config key
Users should add
services.resend.webhook_signing_secretto their config after running the webhook registration command. The secret is returned by Resend's API on webhook creation.Test plan
email.sent(accepted) event type webhook🤖 Generated with Claude Code