nostrband / nostr-login

MIT License
37 stars 4 forks source link

Login via DM option #99

Closed supertestnet closed 2 months ago

supertestnet commented 3 months ago

Some websites, including satoshisettlers.com and vida.io, allow nostr users to log in via a dm. Specifically, they enter their pubkey and a relay, and the website dms them a one time use login code, which the user pastes into the website. Then the website knows it's them and pulls in their metadata from nostr. Will you add support for this login method?

brugeman commented 3 months ago

Nostr-login is client-side component. DM login need server to send a secret code that's generated outside of the client.

Why do you need it? Maybe some other option could work for your case?

nostrband commented 3 months ago

Just pulling metadata can be handled by "read-only" login option already supported by nostr-login.

supertestnet commented 3 months ago

Why do you need it?

I don't need it personally, I've already implemented it. Earlier today, in a telegram channel I'm in, someone said they are making a nostr client and wanted to know a starting point for implementing nostr login. I linked him to this repo and then noticed that it supports nip07 login and nip46 login but not dm-based login. So I just thought it might be a good addition to the library since it's a popular login method for nostr apps.

nostrband commented 2 months ago

Added https://github.com/nostrband/nostr-login#otp-login Do you think this is good enough?

supertestnet commented 2 months ago

That's awesome! Thank you for adding this