reason to use Active_Shopify_Shops

Shopify Partner
87 8 15

I have used shopify-cli to bootstrap the app. In the server.js file the app uses `ACTIVE_SHOPIFY_SHOPS` object to verify if a session already exists,

I don't understand the need for this check, why not just check the session storage(Redis etc.) if a session exists and the session is not expired.


    router.get("/", async (ctx) => {
      const shop =;

      // This shop hasn't been seen yet, go through OAuth to create a session
      if (ACTIVE_SHOPIFY_SHOPS[shop] === undefined) {
      } else {
        await handleRequest(ctx);



Reply 1 (1)

Shopify Partner
87 8 15

I think I have found an answer here ""

Sharing this incase someone else has same doubts.