Jeremy D
Jeremy D
> Actually, what we really need is to upgrade the go-nostr library. The EOSE stuff is already implemented there. The problem is though that we need to figure out our...
I need to go through this PR and re-test everything to sync up against the current huge release. Much was changed.
@pablof7z if i could get a yay, or nay on this fix, i will add some docs about the nip auth. My code depends on this fix now though so...
could be that we're not setting the NDK here when addExplicitRelay is called: [ndk/src/ndk/index.ts line 327](https://github.com/nostr-dev-kit/ndk/blob/master/ndk/src/ndk/index.ts#L327) - relay = new NDKRelay(urlOrRelay, relayAuthPolicy); + relay = new NDKRelay(urlOrRelay, relayAuthPolicy, this);
Ok, I think I am starting to understand what's going on here. (Or at least guess..) It appears to me that the first part of the auth handler was meant...
Like this: ``` if (res instanceof NDKEvent) { this.relay.auth(async (evt: EventTemplate): Promise => { return res.rawEvent() as VerifiedEvent; }); this._status = NDKRelayStatus.CONNECTED; this.ndkRelay.emit("authed"); } ```
Turns out I was just confused about all this stuff. I have backed out all my changes to NDK, and things are working. I even went back to latest released...
> Thanks for all this! I am writing documentation on the docs directory with tutorials and stuff like that > > I would absolutely love it if you could spend...
Cool, while testing this morning I realized I had *not backed out all changes, and that auth actually is broken in master. I will corral and test these changes and...
While this commit does un-stick authentication for a successful authentication. When authentication fails (relay rejects the auth) an error is thrown: ``` index.js:773 Uncaught (in promise) Error: auth-required: invalid auth...