App reviews, troubleshooting, and recommendations
I fallow the steps on this link:
And i endUp with this test code on node js with express to validate the signature:
const SHARED_SECRET = '<My App scret key>'
const query_signature = req.query.signature
const sorted_params = "extra=1,2path_prefix="+req.query.path_prefix+"shop="+req.query.shop+"timestamp="+req.query.timestamp
let calculated_signature = crypto.createHmac('sha256', SHARED_SECRET).update(sorted_params).digest('hex')
if(query_signature == calculated_signature) return True
when i check the data on console, they are diferent:
console.log("query:",req.query.signature)
console.log("hash: ",calculated_signature)
Example of log:
query: 0e22cdb17c43a38d6f7254c77eef1e7e9ef50294fc1f096eab096d09f476581a
hash: f1611e5f5b19fade24a12ec7443105a1cda29cc39977c20cf69e4bd1db1dabc3
Can some one tell me what Am I doing wrong?
I would appreciate any help 😞
Solved! Go to the solution
This is an accepted solution.
guys I was actually able to solve the issue.
The problem wass that i was using this to make the signature:
const sorted_params = "extra=1,2path_prefix="+req.query.path_prefix+"shop="+req.query.shop+"timestamp="+req.query.timestamp
But I wass receiving this:
Query: {
shop: 'multimaxtest2.myshopify.com',
path_prefix: '/apps/test',
timestamp: '1609029203',
signature: '************************'
}
As you can see the extra=1,2 paragram is not send by the request, So I only changed sorted_params value to this:
const sorted_params = "path_prefix="+req.query.path_prefix+"shop="+req.query.shop+"timestamp="+req.query.timestamp
And it start working.
This is an accepted solution.
guys I was actually able to solve the issue.
The problem wass that i was using this to make the signature:
const sorted_params = "extra=1,2path_prefix="+req.query.path_prefix+"shop="+req.query.shop+"timestamp="+req.query.timestamp
But I wass receiving this:
Query: {
shop: 'multimaxtest2.myshopify.com',
path_prefix: '/apps/test',
timestamp: '1609029203',
signature: '************************'
}
As you can see the extra=1,2 paragram is not send by the request, So I only changed sorted_params value to this:
const sorted_params = "path_prefix="+req.query.path_prefix+"shop="+req.query.shop+"timestamp="+req.query.timestamp
And it start working.
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025