Skip to content

Commit

Permalink
fix(storefront): Match only hostname on GitHub OAuth popup emulation …
Browse files Browse the repository at this point in the history
…for DecapCMS signin
  • Loading branch information
leomp12 committed Dec 18, 2024
1 parent d77de0a commit ada84ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/storefront/src/lib/scripts/decap-cms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit ada84ba

Please # to comment.