Webhook missing hmac

I was using a remix template and suddenly encountered this issue in my webhook route, “const { payload, session, topic, shop } = await authenticate.webhook(request);”

webhook Verification suddenly encountered an error: ‘[shopify-app/DEBUG] Webhook validation failed | {valid: false, reason: missing_hmac}.

Through debugging, it can be seen that there is “x-shopify-hmac-sha256” in the headers, and all X-Shopify related initials are lowercase. I want to know why this situation occurs

图片

Hey @kyle_liu, have you checked to see if any middleware may be converting the hmac to all lowercase?
https://shopify.dev/docs/apps/build/webhooks/subscribe/https#common-pitfalls-and-nuances-to-be-aware-of-during-validation

Hey @kyle_liu, Are you still experiencing this issue, or can I mark this as solved?

Hi @KyleG-Shopify

I wrote my own verification funciton to bypass this issue.

I marked it as resolved.

1 Like