If your app already works with key storage extensions (nip-07, window.nostr) then you can use nostr-login library - two lines of code and all your calls to window.nostr are proxied to nip46 remote signing, with a pretty UI showing up for users to login/signup.