better-auth-nostr

github.com/leon-wbr/better-auth-nostr Nostr Open-source projectOpen source

better-auth-nostr adds NIP-98 Nostr authentication to Better Auth through a plugin for login flows.

github.com/leon-wbr/better-auth-nostr
better-auth-nostr homepage screenshot

About better-auth-nostr

better-auth-nostr is an open-source plugin for Better Auth that adds Nostr-based login using NIP-98. On the server, it validates incoming NIP-98 tokens and creates a session cookie without touching passwords or private keys. It also stores each Nostr public key in a configurable nostrPubkey model, so users keep a linked identity, and it lets users attach additional public keys to an existing account through an authenticated endpoint.

The client helper signs the NIP-98 event from one of three sources, in order of precedence: a signer object passed in, an nsec string (bech32 or 64-character hex), or a NIP-07 browser extension that exposes window.nostr.signEvent. The plugin supports NIP-46 remote signers, which the source names as Amber, nsec.app and nsecbunker. Remote signer sessions are live relay subscriptions, so the application must call close() when finished.

Key features

  • Validates NIP-98 tokens and creates a session cookie for Better Auth
  • Stores each Nostr public key in a configurable nostrPubkey model
  • Links additional public keys to an existing account through an authenticated endpoint
  • Client helper signs in with a passed signer, an nsec string, or a NIP-07 extension
  • Supports NIP-46 remote signers through bunker:// URIs or nostrconnect:// QR sessions
  • Lets remote signer sessions resume by persisting the client secret key and bunker URI
Best for: Developers who want to add Nostr-based login and public key linking to a Better Auth application.
Good for
  • The server-side flow works without passwords or private keys.
  • Supports both NIP-46 remote signers and NIP-07 browser extensions.
  • Source code is publicly available under an open-source license.
Watch out for
  • Remote signer sessions must be closed manually by the developer.
  • Some signers prompt for each signature regardless of the permissions requested.
  • Default permissions cover only sign_event:27235, so other signing needs the perms option.

better-auth-nostr at a glance

Type
Open-source project
Pricing
Not confirmed. Check the site
Platforms
Browser extension
Open source
Yes · Source code
Language
English
Last checked
Oct 6, 2026 · Online when checked
Listed
Oct 5, 2026

better-auth-nostr alternatives

Tools and sites you could use instead, ranked by how closely they match.

All 24 alternatives

Popular in Nostr

Well-known listings from the same topic.

All 110

better-auth-nostr FAQ

Does the server need a user's password or private key to sign them in?
No. The plugin validates NIP-98 tokens and creates a session cookie without touching passwords or private keys.
How can users keep their key in a separate signer instead of pasting an nsec?
The client supports NIP-46 remote signers. Users can paste a bunker:// URI or a NIP-05 identifier whose provider advertises NIP-46, or the app can generate a nostrconnect:// URI to show as a QR code.
Is something wrong or out of date?

Tell us and an editor will check it.

Own this website?

Claim the listing and suggest updates yourself. An editor checks every claim first.

Claim this listing