serverless-graphql icon indicating copy to clipboard operation
serverless-graphql copied to clipboard

Bcryptjs uses sync functions

Open denneulin opened this issue 10 years ago • 1 comments

Why do you use synchronous versions of bcryptjs functions ?

user.password_hash = bcryptjs.hashSync(user.password, 10);

could be written

bcryptjs.hash(user.password, 10, function(err, hash) {
    user.password_hash = hash
    ....
});

denneulin avatar Jul 01 '16 16:07 denneulin

Closing this since it's related to the old version. Thanks for looking into it @denneulin

nikgraf avatar Jan 16 '17 02:01 nikgraf