node-auth0 icon indicating copy to clipboard operation
node-auth0 copied to clipboard

getUsers is double encoding the "q" parameter

Open khamasaki opened this issue 10 years ago • 1 comments

When specifying a query using the "q" parameter to getUsers (along with search_engine: "v2"), I am getting back all results instead of the results I expect according to the q value. After tracing through exactly what URL is being requested, I believe the problem is due to this commit:

https://github.com/auth0/node-auth0/commit/eeb8b214f22f9904f17f686469c0a0dbd1430ac4

The "q" parameter is being encoded here, but further down the line the params object is being passed to qs.stringify, which encodes it again.

If I remove the three lines of code that encode "q" I get the results I expect.

khamasaki avatar Jan 16 '16 01:01 khamasaki

Hi khamasaki, thanks for reporting the issue. The encoding bug is now fixed (v2.0.0).

ngonzalvez avatar Jan 26 '16 14:01 ngonzalvez