Skip to content

Commit

Permalink
fix: crash when no user in token
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Krummsdorf committed Jan 14, 2015
1 parent 557223b commit 0684078
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/LxAuth.js
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ module.exports = function (options) {
// update last activity in token database
self.updateLastActivity(token, function () {
// put user in request
var user = token.user;
var user = token.user || {};

user.userId = token.user_id;
user.isAuthenticated = true;
Expand Down

0 comments on commit 0684078

Please sign in to comment.