From 071a97a75161a76dffb295459e52d92f433dc571 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 14 Sep 2020 14:42:32 -0700 Subject: return lnurl linking pubkey in socket message --- routes/lnurl.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'routes/lnurl.js') diff --git a/routes/lnurl.js b/routes/lnurl.js index 2649ea6d..e726b966 100644 --- a/routes/lnurl.js +++ b/routes/lnurl.js @@ -431,7 +431,7 @@ lnurlServer.bindToHook("login", async (key) => { } else { l.info("user not found"); user = await register({ - username: key, + username: key.substr(0, 8), password: key, }); } @@ -442,7 +442,7 @@ lnurlServer.bindToHook("login", async (key) => { const token = jwt.sign(payload, config.jwt); const ws = sessions[logins[key].k1]; if (ws && ws.send) - ws.send(JSON.stringify({ type: "token", data: token })); + ws.send(JSON.stringify({ type: "token", data: { token, key } })); } } catch (e) { l.error("problem with login hook", e.message); -- cgit v1.2.3