embedded app redirects whole page

Solved
Highlighted
Tourist
7 1 0

Hello,

I am building an app with nodejs/expressjs...

I tried to redirect my app when callback function is done.

res.redirect(process.env.BASE_URL + '/shopify/home')

when i install the app in shopify, it redirects to this URL:

 

https://admin/apps/<app_id>/shopify/home

 

knowing that I showed the BASE_URL

res.send(process.env.BASE_URL)

and it showed me the right URL instead of 'admin/apps/<app_id>'

 

res.send(), res.json()... they all work well, but res.redirect() seems like it redirects the whole page instead of your app only

0 Likes
Highlighted
Tourist
7 1 0

This is an accepted solution.

as seen in some examples, I need to render the content inside javascript, as done here:

https://github.com/Shopify/shopify-express/blob/master/routes/shopifyAuth.js

0 Likes