Replying to Avatar JeffG

yo nostr:npub10npj3gydmv40m70ehemmal6vsdyfl7tewgvz043g54p0x23y0s8qzztl5h quick question. I'm getting auth challenges when trying to send GW messages to wss://auth.nostr1.com - pretty sure that's not supposed to happen right?!

Are your messages going through? Because the relay can return auth errors in response to the auto rebroadcasts done by some clients. I just checked on my end and it's working properly for me. Are you using Amethyst?

Reply to this note

Please Login to reply.

Discussion

If you want to do some testing, feel free to DM me and we can see if messages are going through.

I'm trying to publish from code (using rust-nostr) and then REQ for the event using the pubkey that the GW was intended for.

I'm getting errors on publish because I'm not authed.

`Received OK from 'wss://auth.nostr1.com' for event 1a09ef5ed29990221a76a16fcf2981f8682ec107c00c8217985c4c20fd0062ae: status=false, message=auth-required: you must auth`

REQing for the other user I'm getting back 0 events from the relay.

Auth only applies to read requests, so that's where I'd focus my attention; on your process for authing using the npub the message was written to.

That's what I expected but that's not where the issue is. I can auth to the relay when REQing just fine. I just don't get back any events.

When I try and publish I'm seeing the auth request and the auth response but then the event publishing fails.

Are you only having this issue with auth.nostr1.com? Or is it all similar DM relays?

talkin to jeff on the simplex .. ya the auth is required for read and write. anything else pre-auth will (should) receive an ok=false response.

Oh, that's a different issue than what I was thinking of. It sounds like it's either expecting a particular npub to auth but not getting it, or the auth process on your end just isn't working.

Running the same code with non-auth and the other inbox relays I've tried works perfectly.

Have you tried with frens.utxo.one? That's a similarly configured, dedicated DM relay. That, or inbox.nostr.wine if you are a subscriber? Testing on non-auth relays isn't really comparing apples to apples.

Tried on wss://inbox.azzamo.net and it worked first try

I'm not familiar with that relay? Is it a locked-down, dedicated DM Inbox relay?

On closer inspection, it's not actually doing auth 🤦‍♂️

Frens fails in the same way as auth. Sounds like nostr:npub1drvpzev3syqt0kjrls50050uzf25gehpz9vgdw08hvex7e0vgfeq0eseet's workaround is what I need to do.

I'm glad you've got a breadcrumb to follow. I hope it yields results for you!

The NIP42 auth is done automatically by default. The problem is that relay ask for authentication after you send an EVENT or a REQ.

After successful authenticaltion, the REQ is automatically resent but not the event (yet). I wrote a possible workaround here: https://github.com/rust-nostr/nostr/issues/509

Ahh, but why does it work ok on other inbox relays?

Forget this. It's an issue on all inbox relays that are doing auth properly. 🫠

Any ideas on how to fix this properly in the rust-nostr? I'm happy to help on this but want to know what you've already explored or thought about before I start looking into it.