Skip to content

Shopify Dude Fix

Shopify App Proxy Requests: Verify the Signature Before Trusting Customer IDs

Authenticate storefront proxy requests before using their customer context.

Quick answer: Validate the app proxy signature using the app secret and the documented proxy verification algorithm or framework helper.
On this page

Why this happens

A storefront proxy exposes an application endpoint through the shop domain. Query parameters such as logged_in_customer_id are not trustworthy when received directly at an unverified backend endpoint.

Implementation

Use your framework’s app proxy authentication helper where available. Otherwise implement Shopify’s documented parameter canonicalization and HMAC verification with constant-time comparison. After verification, check the shop against your installation records and authorize the requested resource for the verified customer. Treat an empty customer ID as anonymous.

Example

const { session } = await authenticate.public.appProxy(request);
// Check installation and resource authorization before returning data.

This example assumes the Shopify React Router app framework and its configured authenticate helper. A valid proxy request is not automatically permission to read arbitrary customer records.

Common misunderstanding: An app proxy signature is not interchangeable with a webhook HMAC or an OAuth callback signature.
How to test this:

  1. Send a valid storefront request
  2. alter the customer ID
  3. call the backend directly without a signature
  4. test a logged-out shopper
  5. attempt to access another customer’s resource
  6. verify unauthorized requests expose no private data.
Sources and further reading: Shopify reference ยท Further reading