From ada84ba61c7ba4dd4e559819906007182f761217 Mon Sep 17 00:00:00 2001 From: Leonardo Matos Date: Wed, 18 Dec 2024 15:28:49 -0300 Subject: [PATCH] fix(storefront): Match only hostname on GitHub OAuth popup emulation for DecapCMS signin --- packages/storefront/src/lib/scripts/decap-cms.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/storefront/src/lib/scripts/decap-cms.ts b/packages/storefront/src/lib/scripts/decap-cms.ts index 7e28ab8a7..fc75a3309 100644 --- a/packages/storefront/src/lib/scripts/decap-cms.ts +++ b/packages/storefront/src/lib/scripts/decap-cms.ts @@ -142,7 +142,7 @@ const authAndInitCms = async () => { if (!import.meta.env.SSR) { (window as any).CMS_MANUAL_INIT = true; - if (window.opener?.location.pathname === window.location.pathname) { + if (window.opener?.location.hostname === window.location.hostname) { // Emulating GitHub OAuth popup window.opener.postMessage('authorizing:github', '*'); window.close();