aboutsummaryrefslogtreecommitdiffstats
path: root/routes
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2020-06-03 22:05:32 -0700
committerAdam Soltys <[email protected]>2020-06-03 22:05:32 -0700
commit298672d3f50938ba06a16f8e04d607b7033703b8 (patch)
treeea470a624cc36e1f23a1b4841ed8d25d5ebde2b0 /routes
parente6c41a3a14fb8f9d9d89a097796fb2485203af88 (diff)
downloadcoinos-server-298672d3f50938ba06a16f8e04d607b7033703b8.tar.gz
coinos-server-298672d3f50938ba06a16f8e04d607b7033703b8.zip
log login attempts
Diffstat (limited to 'routes')
-rw-r--r--routes/users.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/routes/users.js b/routes/users.js
index 991f803f..6fdd1423 100644
--- a/routes/users.js
+++ b/routes/users.js
@@ -253,6 +253,7 @@ app.post("/user", auth, async (req, res) => {
app.post("/login", async (req, res) => {
let twofa = req.body.token;
+ l.info("login attempt", req.body.username, req.headers["x-forwarded-for"] || req.connection.remoteAddress);
try {
let user = await getUser(req.body.username);
@@ -265,7 +266,7 @@ app.post("/login", async (req, res) => {
l.warn(
"invalid username or password attempt",
req.body.username,
- req.body.password
+ req.body.password,
);
return res.status(401).end();
}