Global Feed Post Login
Replying to Avatar Water Blower

authentication thoughts:

NIP-42 is stateful that it's based on steps of message exchanges over a single websocket connection.

The assumption here is that only one private key, aka account, will use this websocket connection.

But, if a client implements multi accounts, this is no longer true.

The same websocekt connection will be used by 2+ nsec.

Therefore, embedding the auth event in the REQ is a better solution.

It's simpler to implement for both clients and relays and it allows sharing the same websocket connection of multiple nsec

Current NIP-1 REQ

["REQ", "sub id", filter1, filter2, ...]

We can do

["REQ-V2", auth event, "sub id", filter1, filter2]

so that the relay can know which npub is doing this subscription.

Stateless design is more elegant.

Thoughts?

Avatar
Water Blower 1y ago

nostr:nprofile1qyfhwumn8ghj7ur4wfcxcetsv9njuetn9uqsuamnwvaz7tmwdaejumr0dshsz9thwden5te0wfjkccte9ejxzmt4wvhxjme0qqs04xzt6ldm9qhs0ctw0t58kf4z57umjzmjg6jywu0seadwtqqc75s5hh9lh This is more close to how I want auth to work

Reply to this note

Please Login to reply.

Discussion

No replies yet.