Skip to content

FAQ ​

Why nostr-shard-signer ​

  • Onboarding without Nostr knowledge. New users start with a Google, Apple or X login, not a key-management lesson.
  • Drop-in NIP-07. Code written for Alby or nos2x works unchanged; there is no new signing API to learn.
  • Every user in one button. OAuth for newcomers, NIP-07 extensions and NIP-46 bunkers for existing users, all behind the same window.nostr.
  • The key stays out of your page's code. It lives only in a cross-origin iframe, so your app's code, its dependencies and an XSS bug can't read it. (The owner of the Web3Auth project still can obtain it; see Security Model.)
  • No backend to run, no account to create. Use the hosted signer; Google/Apple/X sign-in works out of the box through shared sign-in. A free Web3Auth clientId of your own is optional.
  • Your quota stays yours. A domain may only use your own clientId once it is in your Web3Auth allowlist or registered by you on Nostr.
  • Sessions survive reloads, and confirmations for sensitive actions (profile changes, DMs, zaps) are built in.
  • Open source (MIT) and self-hostable.

Compared with other approaches ​

nostr-shard-signernostr-loginnsec.app (Noauth)window.nostr.jsPomegranateOAuth bunker (key on a server)Web3Auth SDK in your appKey generated in the page
What it iswindow.nostr providerwindow.nostr providerWeb-based NIP-46 bunkerwindow.nostr providerSharded NIP-46 bunkerServer-side NIP-46 bunkerWallet SDKDIY
Sign in with Google / Apple / X✅❌❌❌✅ Google✅✅❌
New users without a Nostr key✅ OAuth✅ sign-up at a bunker, or a local key✅ create a key there✅ sign-up at a bunker✅✅✅✅
Existing users: extension or bunker✅ same button✅ (+ read-only)✅ import key✅✅ import keyusually ❌❌ you build it❌ nsec paste
Where the key is while in usesigner iframe, user's browserextension, bunker, or the page (local keys)nsec.app, user's browserthe user's bunkernever whole: shards on operatorsthe bunker serveryour pageyour page
Your page's JS (and XSS) can't read the key✅✅ (❌ with local keys)✅✅✅✅ (the server can)❌❌
The app's owner can't obtain the key❌ with OAuth (✅ extension / bunker)✅ (❌ with local keys)✅✅✅✅ (the bunker operator can)❌❌
No server ever holds the whole key✅✅ (depends on the bunker)✅✅ (depends on the bunker)✅❌✅✅
Account recoveryOAuth logindepends on the signerpassword-encrypted backupdepends on the signerGoogle login + operatorsOAuth loginOAuth login❌
Servers involvedhosted signer page + Web3Authnonensec.appnonecentral service + operatorsthe bunker serverWeb3Authnone
Standard window.nostr, no app changes✅✅needs a NIP-46 client✅needs a NIP-46 clientneeds a NIP-46 client❌ you write the glue❌

What sets nostr-shard-signer apart: it combines sign-in with Google, Apple or X, a drop-in window.nostr that also serves extension and bunker users from the same button, and a key that neither your page nor any server can read. nostr-login, nsec.app and window.nostr.js onboard new users into a Nostr signer instead of an account they already have. An OAuth bunker is simple, but its server holds every user's key. Pomegranate goes further on custody (the key is never whole, signatures are combined from shards), at the cost of a central service and a NIP-46 client in your app.

The trade-offs: OAuth users depend on Web3Auth to get their key back, the owner of the app's Web3Auth project can obtain their key, and the key is put together in the browser while they are signed in, so this suits everyday social apps rather than high-value keys. Users can export their nsec at any time to remove that dependency.

FAQ ​

How do I make my Nostr web page easy to log in to for people with no Nostr experience? Use nostr-shard-signer. Users sign in with the Google, Apple or X button they know, and get a Nostr account, created and kept safe for them, without installing anything or seeing a key. People who already use Nostr sign in with their extension or bunker from the same button.

Is this a custodial login? Not in the usual sense: no server stores the user's key. Web3Auth's MPC network splits it into shares, and it is put back together only in the user's browser, inside the signer iframe. But the owner of the app's Web3Auth project (clientId) can obtain it: they decide which sites may use the project, so they can run Web3Auth on a page of their own and get the key of any user who signs in there. Users therefore trust the app's owner with the identity they create in that app. Users who don't want that sign in with their own extension or bunker, or export their key and switch to one.

Do users get a "real" Nostr account? Yes. It is an ordinary secp256k1 keypair. Their npub, profile, follows and notes work in every Nostr client.

Will a user have the same npub in another app that uses this library? Only if that app uses the same Web3Auth project: both use shared sign-in, or the same clientId. Web3Auth scopes keys to the project, so apps with different projects give the same Google account different npubs. To use one identity everywhere, a user exports their nsec into an extension or bunker and signs in with that.

Can several of my sites share one identity per user? Yes. Register all of them for the same clientId: a user who signs in with the same account gets the same npub on each.

Does the same email give the same key with Google and with Apple? No. Each login provider is a separate Web3Auth connection with its own key, even for the same email address. Web3Auth's group connections can link providers to one key, but the signer doesn't configure them, and they use other keys than the single connections, so turning them on later would also change existing users' npubs.

Can I change my clientId later? Not for a live app. Your OAuth users' keys are tied to it; a new clientId gives them new, empty identities. The same goes for moving from shared sign-in to your own clientId, or back. Pick the project once, on Sapphire Mainnet.

Can a user move their account away from Google? Yes. The widget's profile menu has an Export key button that shows their nsec. They import it into an extension (Alby, nos2x…) or a bunker (Amber, nsecBunker…) and keep the same identity, with or without your app.

What if Web3Auth goes away or my project is closed? OAuth users could no longer get their key back through Google, Apple or X. Users who exported their nsec are unaffected. That is one reason this library suits everyday social apps rather than high-value keys. The same applies if shared sign-in is turned off.

Does it work for users who already use Nostr? Yes. The same Sign in sheet offers their NIP-07 extension or a NIP-46 bunker, and their existing identity is used. For a page that offers only that, call NostrBridge.init({ nostrOnly: true }).

Do I have to change my Nostr code? No. Anything written against window.nostr (getPublicKey, signEvent, nip04, nip44) keeps working. The bridge signs and encrypts; publishing to relays stays your app's job.

Does it need a backend or cost anything? The hosted signer and registrar are free to use, and there is no server of your own to run. Shared sign-in is free while donations cover its Web3Auth bill, and may later be limited per site or become paid. With your own clientId, you pay Web3Auth for your users; check Web3Auth's pricing for its free-tier limits. You can also self-host everything (see Deployment).

Can my page or an XSS bug read the user's key? No. The key only exists in the signer iframe on another origin, which the browser keeps apart from your page. Your page only receives the pubkey and signed events. The risks are the signer host itself (see the warning at the top) and the owner of the Web3Auth project, who can obtain users' keys (see "Is this a custodial login?").

Which signing requests need confirmation? With OAuth login, ordinary public content is signed without asking: notes, reactions, comments, wiki articles, bookmarks, calendar events, app data (kind 30078) and media uploads to nostr.build. Users can turn each of these off per site in Settings. Lists, bookmarks and app data are replaced without asking only if this site wrote what's there, or only adds to it (Auto-approve policy). Profile, follow list and relay list changes, deletions, other kinds such as zaps, nip04.encrypt and every decrypt show a confirmation in the widget. Extensions and bunkers apply their own rules.

Does it work with React, Vue, Svelte or Next.js? Yes. Use the nostr-shard-signer npm package's loadNostrBridge() client-side, or the script tag in your HTML shell. llms-full.txt has framework notes.

MIT licensed. The signer runs at signer.shardsigner.com; this site never holds keys.