title: How to pass query string from Shopify to an embedded app?
body: <p>I'm building a Shopify app with Next.js and I need to grab the query string so I can check in <code>getServerSideProps</code> the identity of the merchant (bear in mind that Cookies are not recommended for Shopify apps)</p>
  <p>When visiting some apps I noticed some of them are getting the query string passed down from Shopify in each request.</p>
  <h3>This image shows how it should look on each request</h3>
  <p><a href="https://i.stack.imgur.com/vCOeL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vCOeL.png" alt="Shopify app" /></a></p>
  <h3>This image shows how my app behaves</h3>
  <p><a href="https://i.stack.imgur.com/koCOM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/koCOM.png" alt="enter image description here" /></a></p>
  <h3>In this image you can see that when you hover the routes no query strings are present, meaning that are passed somehow by the parent app.</h3>
  <p><a href="https://i.stack.imgur.com/lhaZL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lhaZL.png" alt="enter image description here" /></a></p>
  <p>As of right now I'm using a Cookie to pass the shopOrigin but I feel like it's not necessary if somehow I'm able to get the query string in each request, also with the HMAC I will be able to verify that the requests are coming from Shopify.</p>