I have created a simple embedded public app in shopify using node js . It works properly . I use session for the shop authendication . based on the shopid in the session app display the relevant app data.
while i opened two stores in same browser's different tab . I faced the issue of session clash.
For example shop domains
store2.myshopify.com were opened in same chrome browser.
First i opened store1 it worked properly . Then i opened store 2 it changed the store1 app's session values. Now in both stores app displayed store2 record.
I dont know how to handle this . Please guide me how to resolve this issue
I fixed this in my app Simple Purchase Orders recently.
When a user accesses the app from Shopify, a shop=store1.myshopify.com variable is sent in the get request, you need to check if that shop variable value is equal to the one stored in the session and if not re-authenticate the store.
@GhostApps Thank you for your valuable reply.
But in my case while click my menu it not conatin shop name as a parameter.
while open the app from installed app list page " shop1.myshopify.com/admin/apps " it returns shopdomain as parameter in req.query
while i click my menu inside my embeeded app. req.query is empty. In such case how do i handle ? Pls explain.