Support Aegis URL scheme for NIP-46 login #161

Merged
hodlbod merged 5 commits from priyanshu_bharti/flotilla:83-aegis-url-scheme into dev 2026-04-10 19:04:35 +00:00
2 changed files with 6 additions and 12 deletions
Showing only changes of commit f62171a15e - Show all commits
+5 -9
View File
@@ -11,13 +11,10 @@
const {controller}: Props = $props()
const {url, loading} = controller
const isIos = Capacitor.getPlatform() === "ios"
const openAegis = () => {
controller.launchSigner("aegis")
}
const openNostrSigner = () => {
controller.launchSigner("nostrsigner")
const openSigner = () => {
controller.launchSigner()
}
</script>
@@ -30,10 +27,9 @@
<div class="flex flex-col items-center gap-2">
<QRCode code={$url} />
<p class="text-sm opacity-75">Scan with your signer to log in, or click to copy.</p>
{#if Capacitor.isNativePlatform()}
{#if isIos}
<div class="flex w-full flex-col gap-2">
<Button class="btn btn-primary" onclick={openAegis}>Open in Aegis</Button>
<Button class="btn" onclick={openNostrSigner}>Open in Nostr Signer</Button>
<Button class="btn btn-primary" onclick={openSigner}>Open in Signer</Button>
</div>
{/if}
priyanshu_bharti marked this conversation as resolved Outdated
Outdated
Review

Let's move this button to the a btn-neutral button below "login with a qr code instead" in BunkerLogin

Let's move this button to the a btn-neutral button below "login with a qr code instead" in BunkerLogin
</div>
priyanshu_bharti marked this conversation as resolved Outdated
Outdated
Review

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

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).
+1 -3
View File
@@ -13,8 +13,6 @@ import {pushToast} from "@app/util/toast"
const APP_SCHEME = "social.flotilla"
type NostrSignerScheme = "aegis" | "nostrsigner"
const makeSignerCallbackUrl = (path: string) => `${APP_SCHEME}://x-callback-url/${path}`
const makeSignerLaunchUrl = (nostrconnectUrl: string) => {
1
@@ -72,7 +70,7 @@ export class Nip46Controller {
}
}
launchSigner(_scheme?: NostrSignerScheme) {
launchSigner() {
const nostrconnectUrl = get(this.url)
const signerUrl = nostrconnectUrl && makeSignerLaunchUrl(nostrconnectUrl)