-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Description
Trying to use the
import { WorkOS } from '@workos-inc/node';
const workos = new WorkOS(process.env.WORKOS_API_KEY);
const webhook = await workos.webhooks.constructEvent({
payload: payload,
sigHeader: sigHeader,
secret: process.env.WEBHOOK_SECRET,
});
Webhook processing error: SignatureVerificationException: Signature hash does not match the expected signature hash for payload
/@workos-inc[email protected]/node_modules/@workos-inc/node/lib/common/crypto/signature-provider.js:30:23)
at [object Object]
at fulfilled
(/@workos-inc[email protected]/node_modules/@workos-inc/node/lib/common/crypto/signature-provider.js:5:58)
Doing a manual check as describe here https://workos.com/docs/events/data-syncing/webhooks/3-process-the-events/b-validate-the-requests-manually DOES work.
So I guess it's an issue with the SDK and the crypto usage?
Metadata
Metadata
Assignees
Labels
No labels