The verify
method can be used as a standalone method.
const verify = require('@octokit/webhooks/verify')
const matchesSignature = verify(secret, eventData, signature)
// true or false
options.secret
(String)
|
Required. Secret as configured in GitHub Settings. |
eventPayload
(Object)
|
Required. Webhook request payload as received from GitHub |
signature
(String)
|
Required.
Signature string as calculated by sign() .
|
Returns true
or false
. Throws error if secret, ``eventPayload
or signature
not passed.
Back to @octokit/webhooks README.