Ok I finished the NIP-98 button

https://nostr-one.dolu.dev/

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.

Reply to this note

Please Login to reply.

Discussion

Awesome, it's even a web component!

But I cant click it?

Hm, ok sometimes window.nostr is not defined, yet. I can’t fix it now.

Try to reload the page 😅