Hm, ok sometimes window.nostr is not defined, yet. I can’t fix it now.
Try to reload the page 😅
Ok I finished the NIP-98 button
It's a custom element (can be used anywhere, react, vue, native HTML, ...) that you can install on your website to easily get a NIP-98 HTTP Authentication.
It uses nostr-tools https://github.com/nbd-wtf/nostr-tools/blob/master/nip98.ts that I added today.
Server-side, you can also use nostr-tools nip98.validateToken() to validate the token is valid.
With only "2 lines" of code you can add a button client-side and validate the token server-side
Documentation is probably horrible.
Hm, ok sometimes window.nostr is not defined, yet. I can’t fix it now.
Try to reload the page 😅
Tried a few times but still cant click.
window.nostr not defined is a pain, i tried to make this to stop it, but unsure it works