Open vadym-perenesenko-moc opened 1 week ago
If this is how it was intended, then tell us how to properly sign the requests that come from <ui-modal />
we really need it. We render in<ui-modal />
new page using the src.
Follow this topic and try using the fetch function from the appFrame @vadym-perenesenko-moc https://shopify.dev/changelog/app-bridge-performance-enhancements-potentially-breaking-changes
Inside modal component call the fetch function from appFrame directly appFrame.fetch
@lmtNoLimit the link you provided has nothing to do with calling fetch from modals and has no mention of appFrame.fetch
@lmtNoLimit thanks, it helped me. I can now get the idToken from the app iframe and personally sign the necessary requests
Describe the bug
Fetch doesn't automatically inject auth token when request comes from
<ui-modal />
To Reproduce
Steps to reproduce this behaviour:
If request comes from the app iframe, it is automatically signed.
If request comes from the
<ui-modal />
iframe, the request is not signed.https://github.com/Shopify/shopify-app-bridge/assets/93665352/85a32144-f1b1-44a2-a69a-ca7215bda8d1
I also noticed that the global object in
window.shopify
does not have an idToken method if you look at the object of the iframe from<ui-modal />
Packages and versions
Platform