To continue receiving payouts, you need to secure your account by turning on two-step authentication. If two-step authentication is not turned on your payouts will be paused. Learn more

koa-auth: ctx.redirect(`/?shop=${shop}`) does not lead to iFrame app

orloff
Shopify Partner
22 0 4

Hi all!

I'm created public app based on latest App Bridge React 2.0 and Koa Auth. Everything works fine, app is installed successfully,  except for one final touch: redirection ctx.redirect(`/?shop=${shop}`) after installation leads to store instead embedded (iFrame) app and does not allow me to complete the project. React App Bridge config:

const config = {
apiKey: API_KEY,
host: encodedHost, // base-64 encoded shopOrigin
// shopOrigin,
forceRedirect: true
};

After webHookRegistration.success final step is ctx.redirect(`/?shop=${shop}`), and installation process lead not to the admin embedded app (behavior in AppBridge 1.XX), but to store's url like:

https://mydevstore.myshopify.com/apps/.....API_KEY...../?shop=mydevstore.myshopify.com

If you have experience with this, help me please

Replies 3 (3)
jt274
Shopify Partner
15 1 8

Same issue. Oauth redirects to /apps instead of /admin/apps resulting in a 404. Seems to be a Shopify issue and not the app redirecting to the wrong place, since the app never handles the redirect specifically to /admin/apps.

orloff
Shopify Partner
22 0 4

Have you used a "host" parameter?

As far as I know /?shop=${shop} should be automatically redirects to admin app.

jt274
Shopify Partner
15 1 8

As far as I can tell the host parameter has nothing to do with redirects. But I am using it according to the docs.