User clicks "Login with Nostr"
The button checks if a Nostr key manager (like NostrKey) is installed in the browser.
Add passwordless authentication to your website in 2 lines of code. No emails, no passwords, no OAuth providers. Users own their identity.
One script tag. Loads from the CDN, self-initializes.
Drop a div anywhere on your page. The script renders the button.
When the user authenticates, you get their public key. That's their identity.
If you have NostrKey installed, click the button below.
Everything happens client-side. The script talks directly to the user's key manager. Your server just receives a public key.
Users authenticate with cryptographic keys. Nothing to leak, nothing to reset, nothing to brute force.
Nostr identities are portable. Users aren't locked to your platform or any single provider. Open protocol.
The same identity works on every Nostr-enabled site. Users log in once with their key manager, use it everywhere.
No email required. No tracking cookies. No third-party OAuth. The user's public key is all you need.
Desktop (Chrome, Safari, Firefox). Mobile (iOS, Android). The button adapts and guides users to install if needed.
The button checks if a Nostr key manager (like NostrKey) is installed in the browser.
If installed, the key manager provides the user's public key. If not, the user is guided to install one. No friction either way.
A nostr:login event fires with the user's public key. Store it, use it as a user ID, look up their profile — it's a permanent, cryptographic identity.
The public key is the identity. You can verify it any time. The private key never leaves the user's device.
Customize the button appearance and behavior.
Listen for authentication state changes.
Nostr is an open protocol for decentralized identity and communication. Think of it as a universal login system where users own their identity through cryptographic keys — no company controls it.
A Nostr key manager like NostrKey (browser extension or mobile app). If they don't have one, the button guides them through setup. It takes about 30 seconds.
Just the public key (a 64-character hex string). That's the user's unique identifier. No password hashing, no email verification, no OAuth tokens to manage.
Ask them to sign a challenge — their key manager signs it with their private key, you verify with their public key. The window.nostr.signEvent() API handles this. Or simply trust the initial getPublicKey() for most use cases.
Nostr uses secp256k1 elliptic curve cryptography (the same as Bitcoin). Private keys never leave the user's device. There's no central server to breach, no password database to leak.
No. The script is free and open source. NostrKey is free. Nostr is an open protocol with no usage fees.
Yes. Add data-relay="wss://your-relay.com" to the button div. When users log in, the relay is automatically added to their key manager.
Two lines of code. No backend changes. No vendor lock-in.