const verifyWebhookIntegrity = require('shopify-verify-webhook');
function someHttpRequest(req){
const isValid = verifyWebhookIntegrity(
process.env.SHOPIFY_WEBHOOK_SIGNATURE,
req.headers['x-shopify-hmac-sha256'],
req.body);
if(isValid){
// happy days
}else {
// this request did not originate from shopify
}
}
shopify-verify-webhook
1.0.1 • Public • PublishedPackage Sidebar
Install
npm i shopify-verify-webhook
Weekly Downloads
1
Version
1.0.1
License
MIT
Unpacked Size
1.22 kB
Total Files
3