From ef09600bf561e5fc0221d42f368d8b2639891b2d Mon Sep 17 00:00:00 2001 From: Dev Jones Date: Sat, 17 Oct 2020 23:41:46 -0400 Subject: [PATCH] no trailing slash on shopify prefixes --- src/auth/client/request-storage-access.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/auth/client/request-storage-access.ts b/src/auth/client/request-storage-access.ts index 88d1256..b1be34c 100644 --- a/src/auth/client/request-storage-access.ts +++ b/src/auth/client/request-storage-access.ts @@ -1,16 +1,16 @@ // Copied from https://github.com/Shopify/shopify_app -const requestStorageAccess = (shop: string, prefix = '/') => { +const requestStorageAccess = (shop: string, prefix = '') => { return `(function() { function redirect() { var targetInfo = { myshopifyUrl: "https://${encodeURIComponent(shop)}", - hasStorageAccessUrl: "${prefix}auth/inline?shop=${encodeURIComponent( + hasStorageAccessUrl: "${prefix}/auth/inline?shop=${encodeURIComponent( shop, )}", - doesNotHaveStorageAccessUrl: "${prefix}auth/enable_cookies?shop=${encodeURIComponent( + doesNotHaveStorageAccessUrl: "${prefix}/auth/enable_cookies?shop=${encodeURIComponent( shop, )}", - appTargetUrl: "${prefix}?shop=${encodeURIComponent(shop)}" + appTargetUrl: "${prefix}/?shop=${encodeURIComponent(shop)}" } if (window.top == window.self) {