diff --git a/46.md b/46.md index 60850aaf..2bb28176 100644 --- a/46.md +++ b/46.md @@ -191,6 +191,30 @@ _client_ should display (in a popup or new tab) the URL from the `error` field a ![signing-example-with-auth-challenge](https://i.nostr.build/W3aj.png) +## Pure public key login + +A _client_ SHOULD support logins with just an `npub`, an `nprofile` or a NIP-05 address instead of requiring a full `bunker://...` URI. In order to do that, it can follow these steps: + + 1. Read _user-pubkey_ from the provided NIP-05, `nprofile` or `npub` code; + 2. Acquire the list of outbox relays for _user_ (either by fetching the user's `kind:10002` relay list from relay hints or hardcoded relays or by other means); + 3. Query these relay for a `kind:10046` event from _user_; + 4. Read NIP-46 bunker connection metadata from that event -- then proceed as if the user had typed that bunker URI. + +For this to work _user_ must have somehow published such `kind:10046` event beforehand (which might be a job for the bunker provider or app directly or not). + +### `kind:10046` event format: + +```jsonc +{ + "pubkey": "", + "kind": 10046, + "tags": [ + ["relays", "", ""], + ["pubkey", ""] + ] +} +``` + ## Appendix ### Announcing _remote-signer_ metadata