Show warning for experimental nsec and NIP-46 logins

This commit is contained in:
thePR0M3TH3AN committed 2025-10-26 11:30:51 -04:00
1 parent 4e401b1f5a
commit 00eea6deaa
1 file changed
+18
+18
View File
@@ -5628,6 +5628,24 @@ class Application {
this.applyAuthenticatedUiState();
this.applyCommentComposerAuthState();
const rawProviderId =
typeof detail?.providerId === "string" ? detail.providerId.trim() : "";
const rawAuthType =
typeof detail?.authType === "string" ? detail.authType.trim() : "";
const normalizedProvider =
(rawProviderId || rawAuthType).toLowerCase() || "";
if (normalizedProvider === "nsec" || normalizedProvider === "nip46") {
const providerLabel =
normalizedProvider === "nsec"
? "Direct nsec or seed"
: "NIP-46 remote signer";
this.showStatus(
`${providerLabel} logins are still in development and may not work well yet. We recommend using a NIP-07 browser extension for the most reliable experience.`,
{ showSpinner: false, autoHideMs: 15000 },
);
}
const loginContext = {
pubkey: detail?.pubkey || this.pubkey,
previousPubkey: detail?.previousPubkey,