Shopify.Auth.validateAuthCallback is not stable

Topic summary

A developer is experiencing intermittent failures with Shopify’s OAuth implementation using the shopify-node-api library.

The issue occurs when calling Shopify.Auth.validateAuthCallback, which sometimes throws a “CookieNotFound” error despite following the official documentation. The developer has shared their code implementation via an external link and included a screenshot showing the error.

Current Status:

  • The problem is inconsistent—authentication works sometimes but fails other times
  • A second user has confirmed experiencing the identical issue
  • No solution has been provided yet
  • The discussion remains open with an unanswered question about how to resolve the cookie-related error

This appears to be a stability issue with cookie handling during the OAuth callback validation process.

Summarized with AI on October 31. AI used: claude-sonnet-4-5-20250929.

I did as the document

https://github.com/Shopify/shopify-node-api/blob/main/docs/usage/oauth.md

My code to be:

http://codepad.org/eBh7sFUd

That work sometimes I get an error “CookieNotFound [Error]:”

Thank you for your time!

Hello
Facing the same issue
How did you fix this issue?