Introducing cookieless authentication beta with App Bridge

Yep, even tho it’s a bit tricky. I’ve created a function in in index.html to get that shop param, and i taught that it would work now without cookies but it seems like during the authorization (using koa-shopify-auth) at some point i need the shop param before i have that URL that contains state and shop. So i do something like this in my App.js where i wrap the providers, and it’s working on all browsers and incognito EXCEPT SAFARI. lol i dont know what is going on in safari..

‘Whenever Shopify loads your app in the embedded context, the app URL contains several URL parameters, including a shop parameter that is the shop origin. You can use this shop parameter to load up App Bridge.’

So at a certain point, App Bridge tries to get shop param but it happens before Shopify loads my app in embedded context, thats what im trying to say..

const config = {
    apiKey: process.env.REACT_APP_SHOPIFY_API_KEY,
    shopOrigin: window.getUrlParameter('shop') || Cookies.get('shopOrigin'),
    forceRedirect: true,
  }