Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Redirect to external link (opened in new tab) via Shopify App Bridge is blocked by browser

Redirect to external link (opened in new tab) via Shopify App Bridge is blocked by browser

Daniel-LiveChat
Shopify Partner
11 0 9

Hi!

We're developing app for Shopify and we're using Shopify App Bridge library to allow our iframe interact with Shopify store. Our iframe sometimes needs to perform redirect - open external link in new tab. We can perform reideracts inside Shopify admin panel via App Bridge without any problems but when we're trying to dispatch redirect action to new tab, then this action is blocked by browser. It's treated as pop-up window. We're using this method (as it's describe in Shopify documentation) - https://shopify.dev/tools/app-bridge/actions/navigation/redirect#redirect-to-an-absolute-url-outside.... What's interesting here using `window.open` works correctly.

It's known problem with this kind of redirect? In other situations (I mean - redirects inside app or inside Shopify admin panel) App Bridge works perfectly. Could you help us to find cause of this problem. If it's needed I'll try to provide more details about our code, but we did everything according to documentation.

Thanks for your help1

Reply 1 (1)

dylanpierce
Shopify Partner
296 14 124

I think I may have run into the same problem:

https://github.com/Shopify/shopify-app-bridge/issues/37

I've included example code in that Github issue right in the AppBridge project.

Founder of Real ID - Verify your customer's real IDs easily & securely with modern A.I.

Want to see it in action? Check out our demo store.