Thank you greenart7c3 🫡
There's this library by nostr:nprofile1qqszv6q4uryjzr06xfxxew34wwc5hmjfmfpqn229d72gfegsdn2q3fgpr3mhxue69uhhxct5v4kxc6t5v5hxs7njvscngwfwvdhk6tcpzfmhxue69uhkummnw3e82efwvdhk6tcpz4mhxue69uhhyetvv9ujuerpd46hxtnfduhsk7wj75
https://hzrd149.github.io/applesauce/accounts/accounts.html
https://github.com/nostrband/nostr-login
https://github.com/fiatjaf/window.nostr.js
There's probably more but I don't remember them now
Discussion
Unfortunately, I'm unable to use this code on mobile using Amber. I can only authenticate with Nsec.app and even then, it's not very smooth. When using Amber, the app redirects to Amber, I approve, it goes back to my app, and no event is triggered (in the case of widgets, it stays on "Connecting..."). I might be missing something
Browsers may disconnect when you open another app or another tab. You need to check the connection and reopen the subscription from the relay
Also try using another relay like citrine or a relay in your computer to see if it gives you a better experience
Thanks for the tips! The issues are not related to communication with the relays. I just can't get info from Amber, whether through a link to Amber, Bunker, or QR code.
I managed to use Amber with Flutter using the package amberflutter. I'll explore this to see if I can move forward here. Thanks 🫡