···11+<!doctype html>
22+33+<p>oh sick. hey {{ did }}. you can close this window now.</p>
44+55+<script>
66+// TODO: tie this back to its source...........
77+localStorage.setItem("did", {{{json did}}});
88+window.close();
99+</script>
+34
who-am-i/templates/prompt-anon.hbs
···11+{{#*inline "main"}}
22+<p>
33+ Share your identity with
44+ <span class="parent-host">{{ parent_host }}</span>?
55+</p>
66+77+<div id="user-info">
88+ <form id="action" action="/auth" method="GET" target="_blank">
99+ <label>
1010+ @<input id="handle" name="handle" placeholder="example.bsky.social" />
1111+ </label>
1212+ <button id="allow" type="submit">connect</button>
1313+ </form>
1414+</div>
1515+1616+<script>
1717+const formEl = document.getElementById('action');
1818+const handleEl = document.getElementById('handle');
1919+formEl.onsubmit = e => {
2020+ e.preventDefault();
2121+ // TODO: include expected referer! (..this system is probably bad)
2222+ var url = new URL('/auth', window.location);
2323+ url.searchParams.set('handle', handleEl.value);
2424+ var flow = window.open(url, '_blank');
2525+ window.f = flow;
2626+2727+ window.addEventListener('storage', e => {
2828+ location.reload();
2929+ });
3030+}
3131+</script>
3232+{{/inline}}
3333+3434+{{#> prompt-base}}{{/prompt-base}}