mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-30 09:22:24 +00:00
Show warning for experimental nsec and NIP-46 logins
This commit is contained in:
1 parent
4e401b1f5a
commit
00eea6deaa
1 file changed
+18
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user