aboutsummaryrefslogtreecommitdiffstats
path: root/routes/lnurl.js
diff options
context:
space:
mode:
Diffstat (limited to 'routes/lnurl.js')
-rw-r--r--routes/lnurl.js4
1 files changed, 2 insertions, 2 deletions
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);