diff options
| author | Adam Soltys <[email protected]> | 2020-09-14 14:42:32 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2020-09-14 14:42:32 -0700 |
| commit | 071a97a75161a76dffb295459e52d92f433dc571 (patch) | |
| tree | 30462ff84a860b51dd6d9b2490f4c06f0699e7d3 /routes/lnurl.js | |
| parent | 3ae6e9e46956416164c4540881a3acb81aa0c672 (diff) | |
| download | coinos-server-071a97a75161a76dffb295459e52d92f433dc571.tar.gz coinos-server-071a97a75161a76dffb295459e52d92f433dc571.zip | |
return lnurl linking pubkey in socket message
Diffstat (limited to 'routes/lnurl.js')
| -rw-r--r-- | routes/lnurl.js | 4 |
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); |
