Invalid Signature for App Proxy

Shopify Partner
2 0 0


We are lately encountering a lot of "Invalid signature" errors when validating app proxy signatures.

The query string is : 

For validation, we are calculating the digital signature as per the Shopify documentation available here :

So when generating the HMAC hash, the sorted params string is the following : 

$dataString = 'logged_in_customer_id=path_prefix=/a/pagesections=sections--17064511996130__cart-drawershop=someshop.myshopify.comtimestamp=1708383084';

We're using PHP's hash_hmac function to generate the hash as follows: 

$computedSignature = hash_hmac('sha256', $dataString, $sharedSecret);

However, the computed signature does not match the signature from the initial request.

Did anyone else encountered similar problems lately with validating app proxy signatures?

I am suspecting the problems are generated only when the initial request contains array params (such as sections in the example above), because any requests without array params seem to validate signatures perfectly fine.

Any help or ideas are highly appreciated.


Replies 0 (0)