Harden NIP-98 HTTP auth to exact URL/method with replay protection #12
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Current NIP-98 verification is signer-identity-focused but not request-intent-bound.
Auth events are reusable across endpoints on the same host because backend only checks host containment and frontend signs only base API URL.
NIP-98 expects:
Source: https://github.com/nostr-protocol/nips/blob/master/98.md
This is actually ok, I did this non-standard on purpose to avoid nagging users with sign requests. We just need them to sign to establish a session, and then they're authorized. This allows us to skip cookie based auth which is nice.
Thanks, agreed with the decision choice being intentional.
I’ve opened a docs-only PR to make this explicit in backend/frontend READMEs, API spec, and inline auth code comments so future reviewers understand this is a deliberate tradeoff (fewer signing prompts, no cookie session), not an accidental deviation.
Given that clarification, I’m closing #12 as “by design, documented.”