Shared sign-in
A page that passes no clientId gets Google/Apple/X sign-in through the hosted signer's own Web3Auth project. No Web3Auth account, no allowlist and no registration in the portal: it works on any site.
Sign-in happens in the widget; account choices in a small window on the signer's own address. The widget's Sign in opens Web3Auth's panel in the widget, with the page's extension or bunker offered under it. A new account and a site the account already uses finish there. Anything that shows the account (choosing an identity on a site it isn't used on yet, linking another sign-in, Manage, backup) continues in a window on the signer's own address, which no page can cover, from a click in the widget and without signing in again. With
signInUi: "buttons"the whole sign-in runs in that window, with the signer's own buttons. The Web3Auth session ends as soon as the user's key is ready; the widget keeps this site's identity on the device, sealed with a key the browser won't hand out, until the user signs out here or 30 days pass. Signing out on one site leaves the others signed in.NostrBridge.login()opens the same panel; the user then continues there.Several identities per site. On a site the user already uses, the window shows "Welcome back": their identities, where each was created and which sites use it. They pick one for this site, pair another, create a new one (with their Google name and picture only if they tick it), or unpair one. A new account's first identity starts with the name and picture of the account they signed in with, unless they untick it. In the widget's profile panel they switch between the identities paired with this site; the page sees each switch through
onAuthChangewith the newpubkey. A request is signed by the identity that was active when it arrived, andsignEventwith another identity'spubkeyis refused. The site can tell that identities used on it belong to the same person, and the widget says so.Backup and restore. "Back up now" in the widget (after some use) opens the sign-in window at Backup: the account's master key (with a password, NIP-49, or plain) and an encrypted backup file with the identities' names and sites. Restoring happens only at
https://signer.shardsigner.com/restore/, typed in or bookmarked by the user (it refuses to run in a frame; it also refuses windows another page opened when the browser shows it, which it doesn't for links opened withnoopener, the default fortarget="_blank"): with the master key, or the backup file opened by the master key, a NIP-07 extension or a bunker (Amber) holding it. It lists the identities and exports their keys into another signer. With a backup file, it also offers to put back into the account what the account's list lacks, for instance after the sync service that keeps the list was reset: identities (brought-over and imported ones with their keys) and the sites they were paired with (#137). Nothing in the list is removed or renamed. The backup file also keeps signed copies of the account's Nostr events (Evolustr app-key vaults, the signer's counter and links, each identity's profile, follows and relay list);/restore's Publish again sends them back unchanged, after reading every relay (the signer's and each identity's own write relays): anything with a newer version anywhere is skipped, and each event goes to the relays it belongs on. Profiles, follow lists and relay lists are sent only when ticked, since a relay without the newer one would take the old copy; so are links from a backup older than 30 days, since an old one could bring back a link removed later. No page can start an export or a restore.One account, several sign-ins. The account's identities are derived from the first sign-in (Google, Apple, Facebook or X). In the sign-in window's Manage, the user can link another one: it then opens the same identities, or only the ones the user chooses. Each linked sign-in is another way in, for good (unlinking isn't a revocation); the window says so before linking and shows which account is being linked. Signing in with a provider that opens nothing asks whether the user made an account with another one, instead of quietly creating a second account. With shared sign-in, accounts are tied to the provider's user ID: if the first sign-in's account is lost, linked sign-ins keep working only while their links can be found online, so the backup matters.
One identity across sites. A user gets the same npub on every site that uses shared sign-in. Sites with their own
clientIdgive them other npubs.Free while donations cover it. Web3Auth bills the shared project for every monthly active user, on every site. Donations pay for it: support it on Geyser . If they stop covering the bill, shared sign-in may get a free allowance per site with payment above it (#32–#35), or be turned off. Plan for that.
Switching later costs your users their npub. A site that later moves to its own
clientId(to avoid paying, for example) gives its OAuth users new, empty npubs there. Users who backed up their key keep their identity and can sign in with it through an extension or bunker. If you expect to need your own project, start with it.Safari and iPhone: signed out when the browser quits. Safari, and every browser on iPhone and iPad, keeps the widget's stored data (in the site's page) only until the browser quits (#75). Users then sign in to that site again and get the same identities: keys come from the sign-in, not from the browser. The account's list (identity names, which sites each is used on) also has an encrypted copy on the relays, without any key, so it comes back even when Evolu's relay was reset. The widget tells them once (#75). What only the widget kept (the trust rule's "this site wrote last" records, Sign-in answers) is asked again.
Who can obtain the keys. Whoever runs the hosted signer owns the shared project and can obtain shared-mode users' keys, as an app owner can with its own
clientId. In practice that's everyone who can change the code served on the signer's origin: write access to this repository, its CI workflows and their secrets, the hosting provider, and the build's dependencies. The signer's origin is shared with the portal and examples until it moves to its own domain (#60). The project's Web3Auth allowlist lists only the signer's origin, never a site's, so no site can obtain other sites' users' keys.Sensitive requests open a small window. Any site may embed the signer here and the identity is the same on every site, so decrypts, replacing the profile, follows or relays, deletions, Evolustr app keys and key export are confirmed in a popup on the signer's own origin, which no page can cover or restyle. The user clicks "Review this request" in the widget, then approves in the popup (it opens from that click, so popup blockers don't interfere).
The operator can block a single site (abuse, phishing, or more users than donations cover) without turning shared sign-in off for everyone. A blocked site's users keep extension and bunker sign-in; the console shows
SHARED_BLOCKED. See Blocking a site from shared sign-in.If it is turned off, shared-mode users can't sign in with Google/Apple/X until it is back, with the same keys. Their key backup still works. The widget asks every OAuth user to back up their key.
To opt out, pass your own clientId (keys of your project, your Web3Auth bill), or nostrOnly: true (extension and bunker sign-in only). The console says which sign-in the page got.
Existing pages without a
clientId: this changes what they offer. Before shared sign-in,NostrBridge.init()without aclientIdmeant extension and bunker sign-in only. Pages that load the hostednostr-bridge.jsget the new behaviour without a release on their side: once shared sign-in is live they offer Google/Apple/X too, with keys the signer's operator can obtain, one npub shared with every other shared-mode site, and users counted on the shared project's bill. To keep Nostr-only sign-in, addnostrOnly: true(ordata-nostr-only="true"on the script tag). See the Changelog.