Permalink
Browse files

Merge pull request #491 from murashki/master

session.js code cosmetics
  • Loading branch information...
2 parents ad5fe1d + 63a267e commit 3eaafe4546a139ee8b92a027ad887d90292844d0 @jaredhanson committed on GitHub Oct 10, 2016
Showing with 3 additions and 7 deletions.
  1. +3 −7 lib/strategies/session.js
@@ -54,14 +54,10 @@ SessionStrategy.prototype.authenticate = function(req, options) {
if (err) { return self.error(err); }
if (!user) {
delete req._passport.session.user;
- self.pass();
- if (paused) {
- paused.resume();
- }
- return;
+ } else {
+ var property = req._passport.instance._userProperty || 'user';
+ req[property] = user;
}
- var property = req._passport.instance._userProperty || 'user';
- req[property] = user;
self.pass();
if (paused) {
paused.resume();

0 comments on commit 3eaafe4

Please sign in to comment.