brugeman on Nostr: Server should provide two api endpoints, one accepts npub and should send the one ...
Server should provide two api endpoints, one accepts npub and should send the one time code as dm. The other one accepts the code and should either set a cookie, or return some payload identifying the session. Nostr-login will pass that payload with onAuth event so you could use it to make future api calls. Codes should be bound to npub and expire
Published at
2024-10-17 19:00:33Event JSON
{
"id": "a2aa1045fd1244778631e78eb7c82f8c07540ecf515d6052d10ab58dd9bab18d",
"pubkey": "3356de61b39647931ce8b2140b2bab837e0810c0ef515bbe92de0248040b8bdd",
"created_at": 1729191633,
"kind": 1,
"tags": [
[
"e",
"b1575b3172d43a30db7767ac73442afd81e1b76678d12d8c09e5ea4e610a7f49",
"",
"root"
],
[
"e",
"e92aad64006077b8cecfefce035563505549d5a73b954ebdf7a2a2d047be6367"
],
[
"e",
"b5a18c81a8c3a20358b818c248c43e3d95831f08375eb9d3a7b2f31e83cfec40",
"",
"reply"
],
[
"p",
"99bb5591c9116600f845107d31f9b59e2f7c7e09a1ff802e84f1d43da557ca64"
],
[
"p",
"3356de61b39647931ce8b2140b2bab837e0810c0ef515bbe92de0248040b8bdd"
]
],
"content": "Server should provide two api endpoints, one accepts npub and should send the one time code as dm. The other one accepts the code and should either set a cookie, or return some payload identifying the session. Nostr-login will pass that payload with onAuth event so you could use it to make future api calls. Codes should be bound to npub and expire",
"sig": "845d4fe15a5e3e49728033b46942349f3eaf2fae3d140004516ac8481676e1fb65250a403fce5795b0e5127f8ac9c0bef956ecd17a557b6f43eb5e148200cf0b"
}