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:
@@ -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})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user