shopify hmac computed not the same as received one #11693
Unanswered
Braingearceo
asked this question in
Questions
Replies: 1 comment 5 replies
-
First step here would be to start systematically removing things to remove possible sources of error. HMAC, like any cryptographic algo is really picky and likes to use bytes. I would start by hard coding your key instead of setting it in the env since that is one of the most obvious differences between your code and your flask sample. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First Check
Commit to Help
Example Code
Description
I’m building a Shopify public app and I’m having trouble with the HMAC verification process. Despite using the Shopify Secret from the Dashboard of my app at partners.shopify.com, I can’t get the computed HMAC and the received HMAC to match. This always results in a failed verification.
I’ve tried various combinations, but nothing seems to work—they never match. There might be something I’m missing. I hope someone here has a solution.
Currently, they provide the following Flask example (that do work).
So I can't figure out what I'am doing wrong...
Operating System
macOS
Operating System Details
No response
FastAPI Version
0.110.1
Pydantic Version
2.7.3
Python Version
3.11.9
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions