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

A note for Windows users #5

Open
rhewitt22 opened this issue Jun 23, 2015 · 2 comments
Open

A note for Windows users #5

rhewitt22 opened this issue Jun 23, 2015 · 2 comments

Comments

@rhewitt22
Copy link

The standard bcrypt module doesn't play nicely with Windows. For people that want to kick the tires on this application some suggested modifications:

Replace bcrypt with bcrypt-nodejs

In the User.js model update the beforeCreate function to include null as the third parameter:

beforeCreate: function(values, next) {
    bcrypt.genSalt(10, function(err, salt) {
      if (err) return next(err);

      bcrypt.hash(values.password, salt, null, function(err, hash) {
        if (err) return next(err);

        values.encryptedPassword = hash;
        next();
      });
    });
  },
@Foxandxss
Copy link
Owner

If that fixes it for everybody, you could write a PR to fix that.

@rhewitt22
Copy link
Author

I can create a PR. The register/login/logout seemed to work well, but the messaging functionality did not.

Don't currently have a unix machine to ensure that it's a fix for everyone.

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

No branches or pull requests

2 participants