Skip to content

Commit 86748ac

Browse files
Fix local store domain
1 parent f594242 commit 86748ac

File tree

1 file changed

+4
-1
lines changed
  • packages/cli-kit/src/public/node/context

1 file changed

+4
-1
lines changed

packages/cli-kit/src/public/node/context/fqdn.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,5 +139,8 @@ export function normalizeStoreFqdn(store: string): string {
139139
}
140140
const containDomain = (storeFqdn: string) =>
141141
storeFqdn.endsWith('.myshopify.com') || storeFqdn.endsWith('shopify.io') || storeFqdn.endsWith('.shop.dev')
142-
return containDomain(storeFqdn) ? storeFqdn : addDomain(storeFqdn)
142+
const normalizedFqdn = containDomain(storeFqdn) ? storeFqdn : addDomain(storeFqdn)
143+
// Use dev-api domain for OAuth redirects in local environment
144+
// See: https://github.com/Shopify/dev_server?tab=readme-ov-file#shop-redirects
145+
return normalizedFqdn.replace('.my.shop.dev', '.dev-api.shop.dev')
143146
}

0 commit comments

Comments
 (0)