Hi all,
We have been trying to upgrade our AppBridge according to this doc but are running into an issue making authenticated calls on page load (where previously, we would rely on getSessionToken from app-bridge/utilities we now want to use shopify.idToken())
More context: we have two Shopify apps (one regular and one sales channel) that we manage. We have one deployment for both the apps, with a custom URL search param to help us determine whether to show UI for sales channel or show UI for the regular app – and so our application has add in the script tag for app-bridge with the appropriate API key element calculated at run time.
Due to this limitation, we’re not able guarantee that the shopify global will have appropriate config at page load – I did notice however that there’s also an id_token search param in the iframe embedded app URL, can we rely on that as a fallback value in cases where window.shopify is not yet defined?