Adding Login with Nostr to BOLT.FUN

0 sats
0 comments

After adding auth with Email, we thought we might follow a similar approach to allow users to login to their accounts using their nostr account using OTPs.

User Flow

  • User opens login page

  • Clicks on "Login with Nostr"

  • User will be taken to a different page where he is asked to input:

    1. His nostr pubkey... or maybe his nip5 if he has one.

    2. A relay that he is sure he is connected to.

  • User clicks 'Continue'

  • We send an encrypted DM to this nostr pubkey which will contains an OTP

  • User open his nostr client whatever that is, checks his DMs, sees a new message from BOLT.FUN nostr account

  • User copies OTP & comes back to the login page

  • User paste OTP & clicks submit

  • If credentials are valid, user is logged in.

Technical Flow

In general, it's similar to the flow of the email auth, the main difference is in sending the OTP step.

Maybe some new stuff.

______________________________________________________________________________________________________

Now regarding connecting some nostr key to an already logged in user's account to allow future logins from them, is where there will be some difference too.

Should we do that on top of the "Link Nostr Keys" section in the "Nostr Settings" page in the profile??

Or should we create a new section in the "Security" page for this specifically??

I'm a passionate Front End developer with a love for building unique things. I love a good challenge and am always looking to do stuff that I haven't done before.

Related Project

BOLT🔩FUN

BOLT🔩FUN

View on Nostr

View on Nostr ↗