Reemplaza dist con versión OAuth Popup Final
This commit is contained in:
Vendored
-9
File diff suppressed because one or more lines are too long
Vendored
-9
File diff suppressed because one or more lines are too long
Vendored
-9
File diff suppressed because one or more lines are too long
Vendored
-9
File diff suppressed because one or more lines are too long
Vendored
-9
File diff suppressed because one or more lines are too long
Vendored
-2
File diff suppressed because one or more lines are too long
Vendored
+9
File diff suppressed because one or more lines are too long
Vendored
-2
File diff suppressed because one or more lines are too long
Vendored
-2
File diff suppressed because one or more lines are too long
Vendored
-2
File diff suppressed because one or more lines are too long
Vendored
-9
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Vendored
-9
File diff suppressed because one or more lines are too long
Vendored
-2
File diff suppressed because one or more lines are too long
Vendored
-9
File diff suppressed because one or more lines are too long
-9
File diff suppressed because one or more lines are too long
Vendored
-2
File diff suppressed because one or more lines are too long
Vendored
-9
File diff suppressed because one or more lines are too long
-9
File diff suppressed because one or more lines are too long
Vendored
-9
File diff suppressed because one or more lines are too long
Vendored
+25
-39
@@ -10,47 +10,33 @@
|
||||
/>
|
||||
<meta name="author" content="GomezLee Marketing" />
|
||||
<meta name="theme-color" content="#4F758B" />
|
||||
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
<meta http-equiv="Expires" content="0" />
|
||||
|
||||
<script>
|
||||
(() => {
|
||||
const navigationKey = "glm-tax-oauth-navigation-v3";
|
||||
const refreshKey = "__glm_auth_fresh";
|
||||
const isOAuthPopup =
|
||||
window.name === "glm-tax-google-oauth" && window.opener && window.opener !== window;
|
||||
if (!isOAuthPopup || !window.location.hash) return;
|
||||
|
||||
const hasOAuthResult = () => {
|
||||
const hash = new URLSearchParams(window.location.hash.replace(/^#/, ""));
|
||||
return (
|
||||
hash.has("access_token") ||
|
||||
hash.has("refresh_token") ||
|
||||
hash.has("error") ||
|
||||
hash.has("error_description")
|
||||
const params = new URLSearchParams(window.location.hash.replace(/^#/, ""));
|
||||
const hasOAuthResult =
|
||||
params.has("access_token") ||
|
||||
params.has("refresh_token") ||
|
||||
params.has("error") ||
|
||||
params.has("error_description");
|
||||
if (!hasOAuthResult) return;
|
||||
|
||||
// Entrega el resultado a la ventana principal antes de cargar React.
|
||||
// La ventana principal permanece en el bundle nuevo durante todo el login.
|
||||
window.__GLM_OAUTH_POPUP_CALLBACK__ = true;
|
||||
document.documentElement.style.display = "none";
|
||||
try {
|
||||
window.opener.postMessage(
|
||||
{ type: "glm-tax-oauth-callback", hash: window.location.hash },
|
||||
window.location.origin,
|
||||
);
|
||||
};
|
||||
|
||||
const forceFreshDocument = () => {
|
||||
let pending = false;
|
||||
try {
|
||||
pending = Boolean(sessionStorage.getItem(navigationKey));
|
||||
} catch {
|
||||
pending = false;
|
||||
}
|
||||
|
||||
if (!pending || !hasOAuthResult()) return;
|
||||
|
||||
const url = new URL(window.location.href);
|
||||
if (url.searchParams.has(refreshKey)) return;
|
||||
|
||||
// Este parámetro se agrega DESPUÉS de volver de Supabase. Por eso no
|
||||
// forma parte de redirect_to ni requiere una URL nueva en EasyPanel.
|
||||
url.searchParams.set(refreshKey, String(Date.now()));
|
||||
window.location.replace(url.toString());
|
||||
};
|
||||
|
||||
forceFreshDocument();
|
||||
window.addEventListener("pageshow", (event) => {
|
||||
if (event.persisted) forceFreshDocument();
|
||||
});
|
||||
} catch {
|
||||
// La ventana principal también consulta el hash y localStorage como respaldo.
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<meta property="og:title" content="Seguimiento de Impuestos GLM" />
|
||||
@@ -64,8 +50,8 @@
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="/calendario-impuestos/favicon-192.png?v=glm-2026" />
|
||||
<link rel="shortcut icon" href="/calendario-impuestos/favicon.ico?v=glm-2026" />
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/calendario-impuestos/apple-touch-icon.png?v=glm-2026" />
|
||||
<script type="module" crossorigin src="/calendario-impuestos/assets/index-BsCJFT61.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/calendario-impuestos/assets/index-DrJGHNJG.css">
|
||||
<script type="module" crossorigin src="/calendario-impuestos/assets/index-CeibyB01.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/calendario-impuestos/assets/index-DecncQB8.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
Reference in New Issue
Block a user