@tolt/webhooks and you get a typed event back, or an error.
$ npm install @tolt/webhooks
- Next.js
- Express
app/api/webhooks/tolt/route.ts
What it checks
Verify without the package
Verify without the package
Deliveries are signed by Svix, so any Svix verifier works. By hand: base64-decode the part of your secret after
whsec_, compute HMAC-SHA256 over ${svix-id}.${svix-timestamp}.${rawBody}, base64-encode it, and compare in constant time against each v1,<signature> entry in the space-separated svix-signature header. Reject timestamps more than about 5 minutes off, in either direction.
