Skip to content

Instantly share code, notes, and snippets.

Avatar
😀
Happy-go-lucky every day!

Toby Urff tobyurff

😀
Happy-go-lucky every day!
View GitHub Profile
View webhook_authentication_signature_example.js
const crypto = require('crypto');
const hmac = crypto.createHmac('SHA256', 'my-webhook-secret');
hmac.update('{ ... }'); // request body
const correctHash = hmac.digest().toString('hex');
const receivedHash = '...'; // e.g. req.get('x-impala-signature');
/*
* It's important to perform a constant time equality comparison of the
You can’t perform that action at this time.