feathersjs-ecosystem / authentication-jwt

[MOVED] JWT authentication strategy for feathers-authentication using Passport
https://github.com/feathersjs/feathers
MIT License
30 stars 10 forks source link

Strategy loses the params on its way #36

Closed devel-pa closed 6 years ago

devel-pa commented 7 years ago

Hi, I had an issue with chaining the hooks, standard stuff (authenticate, restrictToOwner) and I realized that the params not arriving to the next hook from time to time.

The next line:

https://github.com/feathersjs/feathers-authentication-jwt/blob/master/src/verifier.js#L30

Shouldn't be like

this.service.get(id, req.params).then(function (entity) {

At least for me fixed the issue (after hours of debugging).

Thanks, Paul

devel-pa commented 7 years ago

Looks like didn't worked as expected even for me :) Instead this works:

    let {provider, ...params} = req.params;
    this.service.get(id, params).then(function (entity) {
daffl commented 6 years ago

This is intended. If you need the parameters you can implement a custom verifier.