Support Aegis URL scheme for NIP-46 login #161
Reference in New Issue
Block a user
Delete Branch "priyanshu_bharti/flotilla:83-aegis-url-scheme"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adds support for Aegis and nostrsigner x-callback URL launch flow for NIP-46 login.
Handles signer callback URLs safely so the app does not navigate to callback paths.
Shows a clear error toast when signer returns an auth error.
What changed
Added x-callback URL generation for connect flow with these params:
method=connect
nostrconnect
x-source
x-success
x-error
Added remote signer launch actions in the QR login flow.
Added callback interception for authSuccess and authError in app URL open handling.
Testing done
pnpm run check passed.
pnpm run lint passed.
Local web sanity test passed:
Remote signer QR screen opens correctly.
QR is generated correctly.
Clicking QR copies the value and shows Copied to clipboard toast.
Issue
Ref #83
This is now fixed and working properly ✅
@hodlbod ,please take a look and merge if it's good.
Thanks!
@@ -22,1 +32,4 @@<p class="text-sm opacity-75">Scan with your signer to log in, or click to copy.</p>{#if Capacitor.isNativePlatform()}<div class="flex w-full flex-col gap-2"><Button class="btn btn-primary" onclick={openAegis}>Open in Aegis</Button>Check if this platform is specifically ios, and only show "Open in Signer", not "Open in Aegis" (the aegis:// scheme I think is for backwards compatibility, which means we only need to deal with the nostrsigner:// scheme).
@@ -36,0 +56,4 @@this.signerUrls.set({aegis: makeSignerLaunchUrl("aegis", url),nostrsigner: makeSignerLaunchUrl("nostrsigner", url),})This seems like unnecessary state/indirection
hii @hodlbod, could you please review it when you have time. Thanks !
if needed any type of changes,please let me know
@@ -23,0 +31,4 @@<div class="flex w-full flex-col gap-2"><Button class="btn btn-primary" onclick={openSigner}>Open in Signer</Button></div>{/if}Let's move this button to the a btn-neutral button below "login with a qr code instead" in BunkerLogin
ce23a67235to993cfe1c02