Oauth cookie not found for shop url

Topic summary

OAuth cookie not found when loading an embedded app from the storefront, while “Test on development store” from the Partners dashboard works. User implemented nonce and signed cookies per docs but storefront flow fails with CookieNotFound when exchanging code for token.

Key references and guidance:

  • Linked GitHub issue comment suggests timing-related cookie issues and iframe/App Bridge redirects.
  • Shopify docs on OAuth flow for embedded apps and redirects were provided.

Clarifications sought:

  • How App Bridge-driven iframe escape happens before OAuth completion.
  • Stack details requested by a responder to diagnose.

Latest update:

  • Reporter resolved the cookie error by directly exchanging the authorization code for an access token via the token endpoint (not using the API library for this step). They asked if this approach will pass public app review; no confirmation yet.

Additional report:

  • Another developer sees the same error using the Shopify Remix template with PostgreSQL and Prisma and requested instructions.

Status: Unresolved. Awaiting best-practice guidance on embedded OAuth (redirects/App Bridge), confirmation on compliance of the manual token exchange approach, and troubleshooting steps for the Remix stack.

Central materials: Linked GitHub issue and Shopify OAuth getting-started docs.

Summarized with AI on January 7. AI used: gpt-5.

In the partners dashboard, testing my app on a test store works. But when I try to load the embedded app in the storefront, it says oauth cookie could not be found for the shop url, everytime. I am using nonce and signing cookies and comparing them like the docs say, but it just says cookie not found only on the storefront page

Error exchanging code for access token: CookieNotFound [Error]: Cannot complete OAuth process. Could not find an OAuth cookie for shop url.

Hey @antoniorr

Does this help?

This is my first shopify app and I am a bit confused, it seems that the repo is saying that cookies issue happens due to timing out, but on my end testing the app on the storefront never works, unrelated to timing out. But when I click test app on test store it works from there. I haven’t done much with app bridge yet because I can only get it to work from test app on test store, not the store front. It seems that repo has a redirect that also involves escaping an iframe with app bridge, but how can that be if oauth has not been completed at that point? I am very confused, any clarification would be greatly appreciated, thank you!

Hey @antoniorr

Here are some docs on the oauth flow including embedded app / redirect details: https://shopify.dev/docs/apps/auth/oauth/getting-started

Can you share details of the stack you’re using / how you created the app?

I exchanged the info for an access token using the endpoint. This seems to have fixed the issue of the cookie issue, will that still pass the inspection for submitting a public app? I used the API library for every other reaction, except ending oauth.

Hey, @SBD

I found same error in my code. I use Shopify remix template with postgres SQl database and Prisma ORM.Suggest me to how to resolve this error.

Thank you.