summaryrefslogtreecommitdiff
path: root/lib/web/auth
diff options
context:
space:
mode:
Diffstat (limited to 'lib/web/auth')
-rw-r--r--lib/web/auth/index.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/web/auth/index.js b/lib/web/auth/index.js
index db5ff11d..9ab62c25 100644
--- a/lib/web/auth/index.js
+++ b/lib/web/auth/index.js
@@ -21,6 +21,11 @@ passport.deserializeUser(function (id, done) {
id: id
}
}).then(function (user) {
+ // Don't die on non-existent user
+ if (user == null) {
+ return done(null, false, { message: 'Invalid UserID' })
+ }
+
logger.info('deserializeUser: ' + user.id)
return done(null, user)
}).catch(function (err) {