Conversation
|
Looks good, as long as the server doesn't use the identifier as the session cookie.
|
The identifier is associated with the session cookie in some way, but it shouldn't be it. |
|
Why not use NIP-98? EDIT: I see NIP-98 is already a part of this. I don't understand what this is solving. |
|
I don't get this at all. What happens when you click? Who is going to handle that link? |
vitorpamplona
left a comment
There was a problem hiding this comment.
Just some nitpicks.
not everyone has an extension. the point of this is if you don't have an extension, you could just scan a QR code/click a link and prove you control an npub without inputting your nsec everywhere. |
|
What about NIP-46? |
I missed the part where you prove anything. Is that part of this NIP? How does clicking a link prove anything? Maybe it is just missing a sentence where this is explained. |
|
cc @danieldaquino for review since you introduced a similar flow for damus purple |
The request has a nip-98 header |
your client sends a POST request that is authenticated with your public key (NIP-98) with an identifier in the login link |
@fiatjaf This is for use cases where you don't need signing access and only need to prove your ownership of a key. |
danieldaquino
left a comment
There was a problem hiding this comment.
I really like this spec, and I think it will be very useful.
Only thing I would add to it is an optional redirect_url field to the JSON response from the server, but otherwise it looks good to me.
|
@Semisol do you have any server where this was implemented already? I need to test Amethyst's implementation of this. |
I'll implement one on nostr.build in the next couple of days. |
|
This looks good I will implement it also. |
@fabianfabian I don't think your server properly enforces NIP-98. It expects the event to have a |
I'm checking the |
|
I've also implemented a server for testing but only accessible via REST API: https://git.rebelofbabylon.com/api/v1/login |
challenge should be in url query string not in tag (nostr-protocol/nips#1042 (comment))
agreed, this is pretty important. |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
@fishcakeday is this available on nostr.build? I want to try it out |
The main usecase we had is that we wanted to explicitly give memberships to npubs to have the ability to display stars on profiles and to give them a purple member number, I see this as more of a thing for niche thing for specifically verifying that a user controls a key to an npub, not as a generic login mechanism, although its true its likely this will be abused for that. I think pushing npubs as a login mechanism is a bit sketchy, because once your key leaks you basically have doors wide open into all the websites you visit. Maybe we should make this explicit in the NIP that this should be probably just be used as a two factor mechanism or for niche use cases like verifying a user controls a key to an npub? Not as a main login mechanism. |
Not even as two factor. The intent for this NIP was to allow easy login to services already linked to your nostr account, like relays, media hosts or NIP-05 providers. |
This spec proposes a simple login flow to allow easy authentication to services like nostr.build without having to deal with DM verification or other confusing flows.