···11+<!DOCTYPE html>
22+<html>
33+<head>
44+ <meta charset="UTF-8">
55+ <title>OAuth Callback</title>
66+</head>
77+<body>
88+ <p>Redirecting...</p>
99+ <script>
1010+ // Relay to Chromium extension callback
1111+ const extensionId = 'kjdnjfgcikmlbloojphbkmknfpmfofio';
1212+ const extRedirect = `https://${extensionId}.chromiumapp.org/extension-callback.html`;
1313+1414+ // Check if we are already in the extension context to avoid infinite loops
1515+ const isExtension = window.location.protocol === 'chrome-extension:' ||
1616+ window.location.hostname.endsWith('.chromiumapp.org') ||
1717+ window.location.protocol === 'moz-extension:';
1818+1919+ if (!isExtension) {
2020+ // We are on the web server (relay), so redirect to the extension
2121+ console.log('Relaying to extension:', extRedirect);
2222+ window.location.href = extRedirect + window.location.search + window.location.hash;
2323+ } else {
2424+ // We are in the extension
2525+ console.log('Authentication successful!');
2626+ // The browser should handle closing this window via launchWebAuthFlow,
2727+ // but we can show a message just in case.
2828+ document.querySelector('p').textContent = 'Authenticated. This window will close automatically.';
2929+ }
3030+ </script>
3131+</body>
3232+</html>