shopify-api-js icon indicating copy to clipboard operation
shopify-api-js copied to clipboard

Cookie Not Found [Error]: Cannot complete OAuth process on Safari 15.6.1

Open julien-mamalian opened this issue 3 years ago • 1 comments

Issue summary

For some of our merchants, in Safari 15.6.1 we have an unexpected issue when going back to auth/callback. The merchants are not able to access the app anymore. We requested access to the merchants store and cannot reproduce the issue, even on the same browser.

We moved from [email protected] to the last version of shopify-api package. The users did not have the issue with [email protected] auth (that sent no secured cookies on Safari).

We are using Koa / Next.js. Our app is not embedded.

Is there a way the issue is caused by cookie params differences between both packages? Is it specific to the client Safari's config? 🤔 We added a page to request cookie consent, but it does not change anything.

We are a bit lost and we do not understand what we can miss here...

Expected behavior

After auth, the cookie should be added to the client browser.

Actual behavior

An error prevents the user from completing the auth process.

CookieNotFound [Error]: Cannot complete OAuth process.


Checklist

  • [X] I have described this issue in a way that is actionable (if possible)

julien-mamalian avatar Sep 11 '22 10:09 julien-mamalian

Also have such error. Looks like for now custom session storage must also have "optional" findSessionsByShopCallback method:

CustomSessionStorage failed to find sessions by shop. Error Details: findSessionsByShopCallback not defined.

but after I added it, it started to search for sessions in another way, so can't find them without update. It starts recursively redirect to /exitiframe, and app not loads and shows "too many redirects" error. When I added exception, not redirect to that path if it's already the same, I received just same error

CookieNotFound [Error]: Cannot complete OAuth process. Could not find an OAuth cookie for shop url: ******.myshopify.com

It's a blocker bug!

Lancer92 avatar Sep 19 '22 08:09 Lancer92

We are closing this issue because we did not hear back regarding additional details we needed to resolve this issue. If the issue persists and you are able to provide the missing clarification we need, feel free to respond and reopen this issue.

We appreciate your understanding as we try to manage our number of open issues.

github-actions[bot] avatar Oct 05 '22 02:10 github-actions[bot]