A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
We're having issues with redirects. We begin the authentication process in a new browser window, and once completed, Shopify redirects to the (redirect_uri) URL in a new tab in the browser rather than the original browser window.
We are just loading https://{shop}.myshopify.com/admin/oauth/authorize?client_id={client_id}&scope={scopes}&redirect_uri...
and once Shopify redirects to the redirect_uri we just render an success message in HTML page.
Why does Shopify open the redirect_uri in a new window tab rather than the pre-existing browser window?
Please note that we are utilizing Shopify admin rest API's and that this is not an embedded app. We are referring to the document below, which is available at https://shopify.dev/docs/apps/auth/oauth/getting-started.
Hi There,
From my experience shopify sometimes does that with development apps/shops, especially if the shop hasn't been migrated to the new admin.shopify.com domain, then when it comes back to the redirect_uri it adds a force legacy domain url attribute which then opens up a new tab.
so I would suggest first checking the dev shop url. ist it a myshopify.com domain or is it admin.shopify.com domain. If its the myshopify.com domain I wouldnt' worry about it too much. If its not I'm sorry but from the screencast I can't see enough to help.
Cheers,
Gary
Hey Gary
Thank you for the prompt reply. I verified that the shop's domain is "myshopify.com". Just to make sure I understand well, this is standard Shopify behavior. Has something lately changed since it was working properly a few months ago and we observe this problem recently?
Hi there,
I believe this is a result of Shopify migrating to admin.shopify.com domain from myshopify.com.
Since I don't work for Shopify i can only guess that this is expected behavior, and can only confirm my own observations, of which this is one. This started not too long ago, and i only noticed this behavior with development shops.
Hope this helps.
Gary