Discussions

Ask a Question
Back to All

Fingerprint header signature validation failing

Hi,

For the webhook api in my server code, I am handling header signature validation for authorization. I recently added this header signing middleware in my express js code and moved the app to Production. Strangely close to 6% of the total requests are failing with Invalid webhook Signature error. This is close to 50K requests getting failed.

I want to know what's wrong here. In my middleware code: I am using Buffer.from(JSON.stringify(req.body)) to get the payload and using the IsValidWebhookSignature method from @fingerprintjs/fingerprintjs-pro-server-api sdk package.

I am using the secret generated while creating the webhook in fingerprint dashboard.

Please let me know what went wrong. Also It would be helpful to know how fingerprint generates the signature internally to validate that JSON.stringify() don't have any problems.