Closes a security flaw where the server trusted any pubkey the client
sent. The frontend now signs a per-session, time-bound challenge
(kind-22242 event) that the backend verifies with swentel/nostr-php
before establishing the session.
- NostrAuth: issueChallenge() + loginWithSignedEvent() with full
schnorr/id verification, TTL window, and idempotent re-entry for
concurrent Livewire listeners.
- auth-button: mounts a fresh challenge, exposes it via data-attribute
+ requestNostrChallenge() fallback, renders a full-viewport AAA-style
loading overlay while the wallet signs.
- NostrSessionGuard: override logout() to drop the cookie-jar dep so
programmatic logout works in any context.
This commit introduces handling for logout events in nostr-login across various pages. When a user logs out, the current public key and other related information are reset to null. The nostrLogin.js file has also been updated to dispatch a 'nostrLoggedOut' event when this occurs. Additionally, the nostr-login package has been added to the project dependencies.