Shopify app loads outside iframe before redirecting

Highlighted
New Member
3 0 2

Hey, I have a react SPA on one domain and my Express server on another.  I'm successfully able to complete OAuth but when I redirect to the client domain it is loaded outside of the iframe, and then redirects back into the iframe after a few seconds (due to AppBridge).  How can I get it to load within the iframe right away?

Here's my setup:
1) App URL points to server /install
2) /install route constructs oauth URL and redirects
3) accept permissions and it calls /callback on server
4) /callback calls res.redirect('myClient.com')
5) myClient.com loads for a few seconds then redirects to https://shopOrigin/admin/apps/myApp within the iframe due to AppBridge (if I try to redirect to https://shopOrigin/admin/apps/myApp directly I get denied by the iframe)

I'm trying to figure out how to get step 5 to not have that loading outside the iframe

Thanks!



0 Likes
Highlighted
Tourist
8 1 0

I am getting almost the same issue, have you managed to find a solution?

0 Likes
Highlighted
New Member
3 0 2

Yeah, I made the app URL on the partner dashboard my client URL (rather than the server) and wrapped it in https://shopify.dev/tools/app-bridge/react-components/provider .  It does the authentication on load and the server redirects to `https://{shopOrigin}/admin/apps/{apiKey}` which opens up the app within Shopify.

2 Likes