Skip to content
This repository

Error: No callback supplied #35

Closed
ryandesign opened this Issue · 2 comments

2 participants

Ryan Schmidt Nick Campbell
Ryan Schmidt

I made the following function:

  var encryptPassword = function(password, next) {
    bcrypt.gen_salt(function(err, salt) {
      if (err) return next(err);
      bcrypt.encrypt(password, salt, function(err, password_crypt) {
        if (err) return next(err);
        return next(null, password_crypt);
      });
    });
  };

When using it I get:

Error: No callback supplied.

Yes I did. I supplied it right there. What I did not supply were the rounds nor the seed_length because the readme said that both are optional.

Nick Campbell
Owner

Suspect I goofed that. ATM supply the rounds and it should work.

I'll fix the error messaging.

Thanks!

Nick Campbell ncb000gt closed this issue from a commit
Nick Campbell API bugs. Fixes GH-35.
Signed-off-by: Nick Campbell <nicholas.j.campbell@gmail.com>
c4b6318
Nick Campbell
Owner

Fixed and available in 0.3.2.

Thanks for finding this, not sure how I missed this to begin with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.