And another strange NIP-42 behavior. inbox.nostr.wine says "auth_required" in NIP-11 but when you connect it dose not send an AUTH challenge until the client tries to publish or read
So noStrudel is in a staring contest with the relay because I don't want it to send a REQ until authenticated but the relay wont send the challenge
Login to reply
Replies (8)
Many relays operate in this way, no? They only ask for AUTH after a REQ if the REQ or EVENT needs auth.
I don't think it makes sense to wait for AUTH upon connection.
easier said then done. am I supposed to make the client send an empty REQ for every connect just to ask if I could please get the auth challenge
That relay won’t honor NIP42 your client is doing the right thing
But NIP-11 says
auth_required: this relay requires NIP-42 authentication to happen before a new connection may perform any other action. Even if set to False, authentication may be required for specific actions.
*any other action* - so to support relays that have auth_required=true and don't immediately send the challenge I would have to basically ignore the auth_required field...
Yes it’s a very ugly fix
["REQ", "auth-ping", {"k": "v"}]) just to provoke the challenge ignore everything till auth completes
That seems like an error in NIP-11. I have seen relays send AUTH at a lot of different times. Sometimes only certain actions are gated behind auth (like requesting content from a closed NIP-29 group).