chadtmiller.com/hud
A remote MCP server that shows atproto records as interactive UI inside MCP Apps hosts
place.hud.hudkit 0.3.1 Latest 5 packages
0
0
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>HUD dev host: signing in</title>
<style>
:root {
color-scheme: light dark;
font-family: system-ui, sans-serif;
font-size: 14px;
}
</style>
</head>
<body>
<p id="said">Signing in…</p>
<script type="module">
// Where the authorization server sends the browser back: its answer
// (code, state, iss, or an error) goes to the dev host on the
// channel it listens on (oauth.ts), and the popup closes. A
// broadcast, not opener.postMessage: a PDS page with
// Cross-Origin-Opener-Policy leaves the popup no opener.
const params = Object.fromEntries(new URLSearchParams(location.search));
const channel = new BroadcastChannel('hud-dev-oauth');
channel.postMessage({ type: 'hud-dev-oauth', params });
channel.close();
document.getElementById('said').textContent = params.error
? `Sign-in refused: ${params.error}. You can close this window.`
: 'Signed in. You can close this window.';
window.close();
</script>
</body>
</html>