Why two different redirect to auth mechanisms

Why two different redirect to auth mechanisms

ryandavisdev
Shopify Partner
7 1 2

In the Shopify cli app template, there are two ways used to redirect an embedded app out of the iframe and to an auth url ...

 

1) In redirect-to-auth.js, the app is redirected to /exitiframe where a component uses app-bridge to follow the redirectUri

2) In return-top-level-redirection, the X-Shopify-API-Request-Failure-Reauthorize header is used where the authenticated fetch hook will use app-bridge to follow the redirectUrl

 

In verify-request, both of these mechanisms are used to redirect the app, even though it seems like they accomplish the exact same thing. Why do we need both? Are there any different between using the header vs using exitiframe component?

Need to hire? Check out "HireUp: Job Listings" on the app store
https://apps.shopify.com/hireup
Replies 0 (0)