From bf29efdd6303935f08d72bf5654ac8bb16bf85ea Mon Sep 17 00:00:00 2001 From: arthurfranca Date: Sun, 4 Aug 2024 10:16:28 -0300 Subject: [PATCH] Add shouldAutoLogin flag to NIP-07 Reason: user should be able to configure the NIP-07 extension to skip the step of manually having to click a "Login with Extension" button. --- 07.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/07.md b/07.md index 9f836d87..b88d34b8 100644 --- a/07.md +++ b/07.md @@ -24,6 +24,12 @@ async window.nostr.nip44.encrypt(pubkey, plaintext): string // returns ciphertex async window.nostr.nip44.decrypt(pubkey, ciphertext): string // takes ciphertext as specified in nip-44 ``` +### Automatic Login + +An optional `window.nostr.shouldAutoLogin` boolean may be added. + +When set to `true`, clients with login functionality should automatically login using the pubkey returned from `await window.nostr.getPublicKey()` call, i.e, without the need to manually click a "Login with Extension" or similar button. + ### Recommendation to Extension Authors To make sure that the `window.nostr` is available to nostr clients on page load, the authors who create Chromium and Firefox extensions should load their scripts by specifying `"run_at": "document_end"` in the extension's manifest.