egg-cnode
egg-cnode copied to clipboard
bcrypt 的 compare 方法,为什么在 TODO 中建议改成异步的调用方式,同步的调用方式有什么问题么?
const passhash = existUser.pass; // TODO: change to async compare const equal = ctx.helper.bcompare(password, passhash); // 密码不匹配 if (!equal) { return null; }