From 452cc19a87f11d2b7ac68df004fa2e8a86bd5810 Mon Sep 17 00:00:00 2001 From: Oscar Date: Fri, 6 Jun 2014 12:28:11 -0500 Subject: [PATCH 1/2] req._query is now req.query Not sure exactly when this happened, but i had to make this change for my versions of node/js --- lib/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/index.js b/lib/index.js index 7e014c7..0c14a8d 100644 --- a/lib/index.js +++ b/lib/index.js @@ -85,8 +85,8 @@ function authorize(options, onConnection) { } //get the token from query string - if (req._query && req._query.token) { - token = req._query.token; + if (req.query && req.query.token) { + token = req.query.token; } if (!token) { From 29b3882355fc32ca199e218d36f0aadb054c80fa Mon Sep 17 00:00:00 2001 From: Oscar Date: Fri, 6 Jun 2014 13:09:06 -0500 Subject: [PATCH 2/2] Make it look for both kinds of query add a check on req.query along with req._query for different versions --- lib/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index 0c14a8d..bcba250 100644 --- a/lib/index.js +++ b/lib/index.js @@ -85,7 +85,10 @@ function authorize(options, onConnection) { } //get the token from query string - if (req.query && req.query.token) { + if (req._query && req._query.token) { + token = req._query.token; + } + else if (req.query && req.query.token) { token = req.query.token; }