Skip to content
This repository was archived by the owner on Aug 29, 2018. It is now read-only.

Strategy loses the params on its way #36

Closed
devel-pa opened this issue Sep 20, 2017 · 2 comments
Closed

Strategy loses the params on its way #36

devel-pa opened this issue Sep 20, 2017 · 2 comments

Comments

@devel-pa
Copy link

devel-pa commented Sep 20, 2017

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
Copy link
Author

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
Copy link
Member

daffl commented Jan 21, 2018

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

@daffl daffl closed this as completed Jan 21, 2018
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants