AppBridge v4 - exit iframe to accept subscription

Hi there,

In AppBridge v3 and below, there was a dedicated way of redirecting outside of the iframe in order to do things like view Shopify Admin resources, or accept subscriptions.

But in AppBridge v4, I’m not seeing an Redirect object on the global shopify object.

When I attempt to use window.location to assign the new URL, it doesn’t escape the iframe and leads to X-Frame errors.

Is there a new way of redirecting outside of the embedded app that I can’t find in the docs?

Ah nevermind, found it:

So to redirect outside of the current iframe, you need to use:

open("https://external.com", "_top")

I personally prefer window?.open() instead of just open(), just in case there’s any breakage and to avoid a possible clash with any functions/libs that may use the open keyword^