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

`idField` breaks from `tokenService.create()` to `populateUser()` after hook #103

Closed
ahdinosaur opened this Issue Mar 15, 2016 · 0 comments

Comments

Projects
None yet
2 participants
@ahdinosaur
Copy link
Contributor

ahdinosaur commented Mar 15, 2016

hey,

so tokenService.create() returns { id: user[idField] }, but populateUser() after hook expects { [idField]: id }. this means populateUser() isn't doing anything after tokenService.create(), which means the same for localService.create().

i'm not sure what's the expected behavior here so i haven't made a pull request, but this lack of any user data returning from client.authenticate() breaks an upgrade from 0.2, or maybe i'm missing something entirely.

ahdinosaur added a commit to ahdinosaur/feathers-authentication that referenced this issue Mar 15, 2016

retrieve user id when populateUser() is an after hook
[`tokenService.create()` returns `{ id: user[idField] }`](https://github.com/feathersjs/feathers-authentication/blob/master/src/services/token/index.js#L96-L98), but [`populateUser()` after hook expects `{ [idField]: id }`](https://github.com/feathersjs/feathers-authentication/blob/master/src/hooks/populate-user.js#L24-L27). this means `populateUser()` isn't doing anything after `tokenService.create()`, which means [the same for `localService.create()`](https://github.com/feathersjs/feathers-authentication/blob/master/src/services/local/index.js#L78-L79).

close feathersjs#103

ekryski added a commit that referenced this issue Mar 18, 2016

@ekryski ekryski modified the milestone: 1.0 release Mar 19, 2016

@ekryski ekryski referenced this issue Mar 21, 2016

Merged

v0.6 - Bugs fixes, new hooks, and hook tests #109

10 of 10 tasks complete

@ekryski ekryski closed this in 7ab7094 Mar 24, 2016

@ekryski ekryski modified the milestones: 1.0, 0.6 Mar 26, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.