Skip to content

verifySignature

1
function verifySignature(
2
headers: IncomingHttpHeaders,
3
body: any,
4
secret: string): boolean

Verifies the signature of the request secret to ensure a secure enviroment.

Parameters

ParameterTypeDescription
headersIncomingHttpHeadersThe headers sent by Twitch.
bodyanyThe body of the request.
secretstringThe secret to use for the verification.

Returns

boolean

Whether the signature is valid.

Source

twitchfy/packages/eventsub/src/webhook/util/verifySignature.ts:12