I am currently implementing LNURL-auth.
Do I have to check if
k1
was created by me? The spec doesn't mention this [1].
I have seen that SN does that but maybe that is only done because the row is updated with the corresponding pubkey on valid signature. [2]Assuming we would not use HTTPS (which the spec requires) or an attacker gets the wallet response in some other way, we could replay
k1
, sig
, key
to a different service which doesn't check if the service provided the k1
.[1] https://github.com/lnurl/luds/blob/luds/04.md
[2] https://github.com/stackernews/stacker.news/blob/master/pages/api/lnauth.js
Posted in SN telegram before
Set-Cookie
headernext-auth
; that takes care of that in ways I didn't understand yet.