Closed duttonkj closed 6 years ago
As long as your service has the id
property pointing to its id field it should already work.
app.service('mycustomService').id = 'customIdField';
Thank you for the PR! I'm going to close it though since this should already be solvable with what I suggested instead of adding a new configuration option that has to be documented and tested.
Summary
We use a custom id field for our feathers services (
_id
). The verifier checks for the service id on the user object using the default.id
. In our case, it throws an error:debug('failed: the service.id was not set');
Also, patches to the user record fail and the userId is not properly set in the token payload due to the same issue.This may not best the solution, but we are proposing passing in an
serviceId
when configuring oauth2:This would default to
id
when not passedNope.
Not at the moment. If this solution is accepted I would open pull request in following packages for related issues:
Thanks for all the hard work on feathersjs!