cnodejs / egg-cnode

CNode 社区 Egg 版本
https://cnodejs.org/
MIT License
1.48k stars 285 forks source link

bcrypt 的 compare 方法,为什么在 TODO 中建议改成异步的调用方式,同步的调用方式有什么问题么? #176

Open qinhaitao97 opened 2 years ago

qinhaitao97 commented 2 years ago

const passhash = existUser.pass; // TODO: change to async compare const equal = ctx.helper.bcompare(password, passhash); // 密码不匹配 if (!equal) { return null; }