From dac693930b80d88ab02be9df3812b054532a160d Mon Sep 17 00:00:00 2001 From: Pieter Jan De Smedt Date: Thu, 8 Oct 2015 14:06:33 +0200 Subject: [PATCH] fix(lib/index.js) return auth.success Next step would not execute because no function(socket, next) was returned in case of successful verification in the 'one roundtrip' (handshake) approach. Returning auth.success instead of just executing it solves this. Fixes #51 --- lib/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index e53aa5d..37405fd 100644 --- a/lib/index.js +++ b/lib/index.js @@ -144,7 +144,7 @@ function authorize(options, onConnection) { data.decoded_token = decoded; - auth.success(data, accept); + return auth.success(data, accept); }); }; }