From ae6bc3dc29198ae1df978124e9d387817402326c Mon Sep 17 00:00:00 2001 From: artur Date: Mon, 29 Apr 2024 16:24:44 +0200 Subject: [PATCH] Reduce min pow, add verifySignature to nip98 --- src/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/index.js b/src/index.js index 0ae1ea2..883ce9b 100644 --- a/src/index.js +++ b/src/index.js @@ -519,6 +519,10 @@ async function verifyAuthNostr(req, npub, path, minPow = 0) { return false; } + // finally after all cheap checks are done, + // verify the signature + if (!verifySignature(event)) return false; + return true; } catch (e) { console.log("auth error", e);