From e8de9f2498953c4fce973ee681dd3394a5b859d7 Mon Sep 17 00:00:00 2001 From: Chris Blanchard Date: Tue, 18 Aug 2015 11:40:15 +0100 Subject: [PATCH] Deny auth on failed requests --- config/socketio.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/socketio.js b/config/socketio.js index 878d0fd..9b55ed2 100644 --- a/config/socketio.js +++ b/config/socketio.js @@ -46,7 +46,7 @@ module.exports = io => { client.getUserById({ id: session.user }, (error, response, body) => { - if (error) { + if (error || response.statusCode !== 200) { winston.error(error); return next(error) };