From fb02873dd04dacd7f2cc78e5bdfcbd051ca8a600 Mon Sep 17 00:00:00 2001 From: Marti Martz Date: Wed, 4 Jan 2023 10:14:54 -0700 Subject: [PATCH] Some twiddles (#1985) * Back-end twiddle Auto-merge --- controllers/auth.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/controllers/auth.js b/controllers/auth.js index 9940ef451..52ddfb1de 100644 --- a/controllers/auth.js +++ b/controllers/auth.js @@ -422,6 +422,8 @@ exports.callback = function (aReq, aRes, aNext) { } aReq.logIn(aUser, function (aErr) { + var now = null; + if (aErr) { console.error('Not logged in'); console.error(aErr); @@ -434,9 +436,16 @@ exports.callback = function (aReq, aRes, aNext) { } // Show a console notice that successfully logged in - if (isDev || isDbg) { - console.log(colors.green('Logged in')); - } + now = new Date(); + + console.log( + colors.green('Logged in'), + aUser.name, + colors.green('at'), + aReq.connection.remoteAddress, + colors.green('on'), + now.toISOString() + ); // Store the user info in the session aReq.session.user = aUser;