diff --git a/index.html b/index.html index f774b18..3414acc 100644 --- a/index.html +++ b/index.html @@ -4718,6 +4718,14 @@ RESPOND WITH EXACTLY ONE LINE. No explanation, no preamble.`; const cleanUrl = window.location.origin + window.location.pathname; window.history.replaceState({}, '', cleanUrl); + // A stale OAuth callback must never re-enable a cloud request while + // strict local-only mode is active. + if (state.localOnly) { + sessionStorage.removeItem('or_code_verifier'); + sessionStorage.removeItem('or_callback_url'); + return false; + } + const codeVerifier = sessionStorage.getItem('or_code_verifier'); if (!codeVerifier) { console.warn('[OAuth] Got code but no verifier in session — stale callback?');