Shopify / shopify-app-bridge

https://shopify.dev/docs/api/app-bridge
82 stars 9 forks source link

Getting the merchant's app.hostOrigin #208

Closed matija2209 closed 1 year ago

matija2209 commented 1 year ago

Describe the bug

app.hostOrigin always returns https://admin.shopify.com

To Reproduce

const app = useAppBridge();

Expected behaviour

Instead of https://admin.shopify.com receive https://store-name.myshopify.com

joeyfreund commented 1 year ago

app.hostOrigin always returns https://admin.shopify.com/

This is not a bug, it is the expected behaviour whenever a store is served from admin.shopify.com (aka unified admin). There's more info here.