nostter icon indicating copy to clipboard operation
nostter copied to clipboard

support nip46 login

Open fiatjaf opened this issue 1 year ago • 11 comments

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 avatar Nov 02 '24 05:11 fiatjaf

@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.

vercel[bot] avatar Nov 02 '24 05:11 vercel[bot]

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.

fiatjaf avatar Nov 02 '24 11:11 fiatjaf

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.

fiatjaf avatar Nov 02 '24 11:11 fiatjaf

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

vercel[bot] avatar Nov 02 '24 20:11 vercel[bot]

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

SnowCait avatar Nov 03 '24 00:11 SnowCait

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.

fiatjaf avatar Nov 03 '24 03:11 fiatjaf

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

SnowCait avatar Nov 03 '24 04:11 SnowCait

I fixed NIP-42 signer bug by #1505. Please merge the main branch if necessary.

SnowCait avatar Nov 06 '24 11:11 SnowCait

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.

fiatjaf avatar Nov 08 '24 12:11 fiatjaf

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.

SnowCait avatar Apr 19 '25 03:04 SnowCait

One day everything will be fixed.

fiatjaf avatar Apr 19 '25 12:04 fiatjaf