On login, if "name" field is not present, but a nostr identity is, try to fetch the kind 0 for the npub in the id field.
Here is sample kind 0 for this user
{
"id": "24471171cc058128efe7d88be4c402d84fab7b6c7cf6e4326b4498c95c6f4655",
"pubkey": "6efb74e66b7ed7fb9fb7b8b8f12e1fbbabe7f45823a33a14ac60cc9241285536",
"created_at": 1701844627,
"kind": 0,
"tags": [],
"content": "{\"picture\":\"https://nostr.build/i/nostr.build_a1a006a9d6a6246dce3302ce2c65ae13682b65837fe4d4afdc486fd7591dcfab.gif\",\"nip05\":\"chef4brains@nostrpurple.com\",\"banner\":\"https://nostr.build/i/nostr.build_c5835e338d784247e88dc4a033a073d856216d49e3afe93d8b37451271f5dc34.jpeg\",\"damus_donation_v2\":100,\"about\":\"I cook, I learn, I HODL. \\n\\n‘If more of us valued food and cheer and song above hoarded gold, it would be a merrier world.’ Tolkien\\n\\n#AUStrich\\n#AUStriches \\n#bitcoin\\n#chefstr\",\"website\":\"\",\"lud16\":\"chef4brains@getalby.com\",\"display_name\":\"chef4₿rains\",\"name\":\"chef4₿rains\"}",
"sig": "4e066509a59d4e3c22ce5353382f0afd78b0cd38d35bb8e5c37a447268db1b2f953fa5f31c1eba164c8a01acfd052096c4c9927b20d427e861b644c56bda352a"
}
The content field needs parsed, and the embedded name field should reveal as chef4â‚¿rains
Consider this identity
On login, if "name" field is not present, but a nostr identity is, try to fetch the kind 0 for the npub in the id field.
Here is sample kind 0 for this user
The content field needs parsed, and the embedded name field should reveal as
chef4â‚¿rains
Save locally, and PUT to the server.