ok how the fuck do you build this single-click-it-opens-my-amber login flow?

Reply to this note

Please Login to reply.

Discussion

I wish I knew πŸ˜‚

Why do I even have to click it?

Why can't apps just automatically detect that I have android signer(s)?

I think web apps can't. Native apps can

Oh, I'm building Native. And am doing what I describe.

Why do PWAs have to have you click a button first? That's weird.

Browsers don’t have same permissions as native I believe

Safari for example doesn’t support push notifications

that makes sense

So wait you're responding to me or to him?

Nostrudel PWA and other have it work.

web app? the easy way is using https://github.com/nostrband/nostr-login or https://github.com/fiatjaf/window.nostr.js for using with remote login (bunker)

You can use or copy this library https://github.com/hzrd149/applesauce/blob/master/packages/signers/src/signers/amber-clipboard-signer.ts from nostr:nprofile1qy2hwumn8ghj7erfw36x7tnsw43z7un9d3shjqpqt228kfsq8h6ellckufmkg2g04sz8vw60vvpy3k8uslefm02xmu2qag9jc0 if you just want to call amber and dont care about remote login. The downside of this one is that you need the clipboard access and if you need to decrypt or sign a lot of things it will open amber every time with no way of calling it in background like native apps or remote login

If you are using nip 46 you can also just send a href with the nostrconnect uri

https://github.com/nostr-protocol/nips/blob/master/46.md#direct-connection-initiated-by-the-client

I do signin with nip55. Works also with signer on desktop.