I was struggling with logins on different platform (desktop, android, etc) for my #workout app @workstr . I had to develop something. Workstr’s “Add Device” lets you move your Nostr identity to another client or device without copying and pasting your nsec.
The new device creates a temporary ephemeral keypair and displays the public pairing data as a QR code. Your trusted device scans it, asks for approval, then encrypts your nsec with NIP-44 specifically for that ephemeral key.
The encrypted response is published as a short-lived ephemeral Nostr event through the relay. The relay only sees ciphertext and never receives the ephemeral private key.
The new device decrypts the transfer locally, imports the nsec, then destroys the temporary pairing key. The pairing is single-use and expires automatically.
