support nip46 login
Not very well tested yet, but seems to work. I'll leave this here just in case.
One thing that is puzzling me is that even though this works with NIP-46 Nostter still prompts me to authorize stuff from nos2x. Do you know if there is some other weird place where it could be calling that? It isn't happening in the Signer object.
@fiatjaf is attempting to deploy a commit to the snowcait's projects Team on Vercel.
A member of the Team first needs to authorize it.
Yes, this seems to work fine. Except I can't see the posts I just made using a new bunker. I can see them in other clients though, so seems to be a different issue.
Hmm, yeah, when the bunker doesn't support nip04 things go bad. Could that be it?
I tried with two bunkers, one supporting nip04_encrypt/decrypt, and it worked perfectly. The other didn't, so I could still write posts, but my own posts were not showing for me.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| nostter | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Nov 5, 2024 10:04am |
Thanks!
One thing that is puzzling me is that even though this works with NIP-46 Nostter still prompts me to authorize stuff from nos2x. Do you know if there is some other weird place where it could be calling that? It isn't happening in the Signer object.
It might be NIP-42 AUTH.
I'm using the authenticator: "auto" option of rx-nostr which signs kind 22242 automatically, and maybe it has a bug that cannot switch signer because I don't set signer option yet. I'll look into it a bit more.
https://github.com/fiatjaf/nostter/blob/088439ebafd371e762497855bb1030f517b2048e/web/src/lib/timelines/MainTimeline.ts#L52
Oh, by the way, I've included this weird @nostr/tools library to avoid updating the nostr-tools you have, which is a very old v1 version. I think this could help too if you want to slowly switch from nostr-tools into @nostr/tools in the future, but keep both around while the transition isn't fully complete.
Yes, I'm still using the old SimplePool for logging and can't upgrade the version unless I switch to rx-nostr because the latest version of SimplePool can't output logs. Anyway, it's interesting and helpful how the versions can coexist. TIL
I fixed NIP-42 signer bug by #1505.
Please merge the main branch if necessary.
I wish there was a way to schedule browser tabs to reappear after a while. I'll have to close this one now and because that doesn't exist I'll have to rely on my memory to open this again next week. Wish me luck.
I updated nostr-tools to the latest version and merged it into this branch. I tried again hoping that it had been fixed on the nsec.app side, but it didn't work.
One day everything will be fixed.