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

hashPassword in patch #286

mcchrish opened this Issue Sep 8, 2016 · 2 comments


None yet
2 participants
Copy link

mcchrish commented Sep 8, 2016

This check is preventing patch methods if password is not defined in the data.


This comment has been minimized.

Copy link

marshallswain commented Sep 8, 2016

Yeah. hashPassword should just hash a password if one is available. I made a PR.

cc: @ekryski, @daffl

Looks like I need to update tests, still. But I don't think this should break anything. Am I missing something?


This comment has been minimized.

Copy link

mcchrish commented Sep 13, 2016

An alternative for now is:

const { hooks } = require('feathers-authentication');

// Your custom hashPassword hook
exports.myHashPassword = function(options) {
  const hashPassword = hooks.hashPassword(options);

  // Add any custom options
  return function(hook) {
    if( !== undefined) {
      // Call the hashPassword hook
      return, hook);

Taken from

@daffl daffl closed this in #287 Sep 28, 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.