Skip to content

Commit

Permalink
Some twiddles (#1985)
Browse files Browse the repository at this point in the history
* Back-end twiddle

Auto-merge
  • Loading branch information
Martii authored Jan 4, 2023
1 parent acca08e commit fb02873
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions controllers/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
Expand Down

0 comments on commit fb02873

Please sign in to comment.