A no-build nostr login web component. Supports NIP-07 browser extensions,
pasted keys, and guest keys — and exports nip98Fetch for
NIP-98 HTTP auth. Inspired by
xlogin.
<script type="module" src="https://nostr-client.github.io/login/login.js"></script> <nostr-login></nostr-login>
After login every component on the page can use
window.nostrSigner / window.nostrPubkey, or listen
for nostr:login / nostr:logout on
window:
logged out
Builds a signed kind 27235 event and sends it as an
Authorization: Nostr … header:
—