From 43a6db786cb2c4f500576fd07299bf219f1d58ed Mon Sep 17 00:00:00 2001 From: bluebeel Date: Sun, 6 Dec 2020 18:31:07 +0100 Subject: [PATCH] update redirect policy --- package-lock.json | 2 +- src/auth/redirection-page.ts | 9 ++------- src/verify-request/verify-request.ts | 2 ++ 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4d6e79c..2ef2171 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "@bluebeel/nextjs-shopify-auth", + "name": "@bluebeela/nextjs-shopify-auth", "version": "0.2.3", "lockfileVersion": 1, "requires": true, diff --git a/src/auth/redirection-page.ts b/src/auth/redirection-page.ts index 54f1854..0c0bdc5 100644 --- a/src/auth/redirection-page.ts +++ b/src/auth/redirection-page.ts @@ -7,16 +7,12 @@ type RedirectionParams = { export default function redirectionScript({ origin, redirectTo, - apiKey + apiKey, }: RedirectionParams) { return ` `; diff --git a/src/verify-request/verify-request.ts b/src/verify-request/verify-request.ts index 0911497..1b44deb 100644 --- a/src/verify-request/verify-request.ts +++ b/src/verify-request/verify-request.ts @@ -21,6 +21,8 @@ export default async function verifyRequest({ }; const shopFromQuery = Array.isArray(query.shop) ? query.shop[0] : query.shop; + console.log("lib", cookies) + console.log("shop", shopFromQuery) if (shopFromQuery && cookies.shopOrigin) { if (shopFromQuery !== cookies.shopOrigin) { // go through login process if different shops