From 00eea6deaa6cddf1e12cd0f7789533acab3f318f Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Sun, 26 Oct 2025 11:30:51 -0400 Subject: [PATCH] Show warning for experimental nsec and NIP-46 logins --- js/app.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/js/app.js b/js/app.js index d680a3b9..8fdfc70b 100644 --- a/js/app.js +++ b/js/app.js @@ -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,