oren_z0 on Nostr: When you login with user/bunker-url, it checks if window.nostr is defined and tries ...
When you login with user/bunker-url, it checks if window.nostr is defined and tries to call window.nostr.getPublicKey(). Otherwise it generates a temporary key like in the old behavior. I didn’t test what happens if the extension does not give permission for getPublicKey(), but if it returns undefined then the old behavior should run.
Thanks for the zap 🙏
Published at
2024-08-17 09:21:51Event JSON
{
"id": "352a04a7eae80914692d6cd20cabcdadb13df0f112072dc7e0a3ba97c01d5ac9",
"pubkey": "3316e2d88ff91e1089c75feedcd8baa2258b45455a3b156af617d7ec79b45fe5",
"created_at": 1723886511,
"kind": 1,
"tags": [
[
"e",
"62d2fca135d704d511249127601d66dd547eac6dfeafa5fecb1919f5f0bccb45",
"",
"root"
],
[
"e",
"58608e88c572568dd0654721c9c5e07fb2a742768e0573041127fc250b0c860a",
"",
"reply"
],
[
"p",
"8ec86ac9e10979998652068ee6b00223b8e3265aabb3fe28fb6b3b6e294adc96"
],
[
"p",
"3356de61b39647931ce8b2140b2bab837e0810c0ef515bbe92de0248040b8bdd"
],
[
"p",
"4657dfe8965be8980a93072bcfb5e59a65124406db0f819215ee78ba47934b3e"
]
],
"content": "When you login with user/bunker-url, it checks if window.nostr is defined and tries to call window.nostr.getPublicKey(). Otherwise it generates a temporary key like in the old behavior. I didn’t test what happens if the extension does not give permission for getPublicKey(), but if it returns undefined then the old behavior should run.\n\nThanks for the zap 🙏",
"sig": "fe23e2c93e464e7e1de8e71ee1aa802793b1a3a12eb1e44c922558e79b4aa0c77c99ac0ad7233b14bbae1d59da687efb4f238b00c412571309e4ddccb704dc42"
}