index.js
/*
 * Make sure the request actually comes from Facebook by comparing the signature
 */
Make sure the request actually comes from Facebook by comparing the signature
Make sure the request actually comes from Facebook by comparing the signature
function valid_signature(signature, body) {
    let hmac = crypto.createHmac('sha1', config.APP_SECRET);
    hmac.update(body, 'utf-8');
    return signature == `sha1=${hmac.digest("hex")}`;
}
function valid_signature ( signature , body ) { let hmac = crypto . createHmac ( 'sha1' , config . APP_SECRET ) ; hmac . update ( body , 'utf-8' ) ; return signature == ` ${ hmac . digest ( "hex" ) } ` ; }
Make sure the request actually comes from Facebook by comparing the signature
Make sure the request actually comes from Facebook by comparing the signature