This repository has been archived by the owner on Jan 30, 2023. It is now read-only.
Auth callback should throw 403 if CookieNotFound occured to handle OAuth retries #110
Closed
2 tasks done
Labels
Overview/summary
When
validateAuthCallback
called, shopify-api will throw a CookieNotFound error if sessionCookie has been expired.In the scenario, koa should throw 403 instead of 500 to handle retrying OAuth process.
koa-shopify-auth/src/auth/index.ts
Line 110 in ba16b83
Motivation
You know the OAuth process has a limit of 60s to be completed, and it will expire the sessionCookie after that point.
Shopify testers sometimes wait 60s before continuing the OAuth process then cause Internal Server Error.
In order to pass the test, we need to handle OAuth retries, but with a 500 error, error handling is difficult.
Related issue: Shopify/shopify-api-js#130 (comment)
Checklist
The text was updated successfully, but these errors were encountered: