Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Oauth cookie not found for shop url

Oauth cookie not found for shop url

antoniorr
Shopify Partner
3 0 0

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. 

Replies 5 (5)

SBD_
Shopify Staff
1831 273 423

Hey @antoniorr 

 

Does this help?

Scott | Developer Advocate @ Shopify 

antoniorr
Shopify Partner
3 0 0

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!

SBD_
Shopify Staff
1831 273 423

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?

Scott | Developer Advocate @ Shopify 

antoniorr
Shopify Partner
3 0 0

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.

Darshan13
Shopify Partner
11 0 2

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.