Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feathers 4.0.0-pre.2] Authenticated: true is not added to context.params #1360

Closed
KidkArolis opened this issue May 19, 2019 · 1 comment · Fixed by #1367
Closed

[Feathers 4.0.0-pre.2] Authenticated: true is not added to context.params #1360

KidkArolis opened this issue May 19, 2019 · 1 comment · Fixed by #1367

Comments

@KidkArolis
Copy link
Contributor

Is this by design or by accident that the authenticate() hook bundled in @feathersjs/authentication no longer sets context.params.authenticated = true? This breaks users of makeCallingParams that are relying on this param to be passed through to nested service calls. The old hook was setting it: https://github.com/feathersjs/authentication/blob/master/lib/hooks/authenticate.js#L80.

@KidkArolis
Copy link
Contributor Author

I had to create such a proxy hook in my app, otherwise it's inconvenient to forward calls to other services from already authenticated services (since they rerun authentication() hook logic instead of skipping it):

const auth = () =>
  combine(authenticate('jwt'), context => {
    if (context.params.provider) {
      context.params.authenticated = true
    }
  })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant