Reads a v1 secret: whsec_ plus the standard base64 of the HMAC key, as the server shows it once.
v1
whsec_
The secret.
The HMAC-SHA256 key bytes.
WebhookConfigError when the value is empty, has another prefix, is no standard base64 or decodes to no bytes; the message never repeats the value.
const key = parseWebhookSecret(process.env.WEBHOOK_SECRET ?? ""); Copy
const key = parseWebhookSecret(process.env.WEBHOOK_SECRET ?? "");
Reads a
v1secret:whsec_plus the standard base64 of the HMAC key, as the server shows it once.