Support Aegis URL scheme for NIP-46 login (#161)

Co-authored-by: Priyanshubhartistm <bhartipriyanshustm@gmail.com>
Co-committed-by: Priyanshubhartistm <bhartipriyanshustm@gmail.com>
This commit was merged in pull request #161.
This commit is contained in:
2026-04-10 19:04:34 +00:00
committed by hodlbod
parent f1f2083c88
commit e8c94177ca
3 changed files with 58 additions and 1 deletions
+15
View File
@@ -78,6 +78,21 @@
return
}
if (url.host === "x-callback-url") {
if (url.pathname === "/authError") {
const errorMessage = url.searchParams.get("errorMessage")
pushToast({
theme: "error",
message: errorMessage || "Signer authorization failed.",
})
}
if (["/authSuccess", "/authError"].includes(url.pathname)) {
return
}
}
const target = `${url.pathname}${url.search}${url.hash}`
goto(target, {replaceState: false, noScroll: false})
})