Tag: bcrypt
-
Bcrypt with graphQL and nestJS
0 In NestJS and GraphQL while using Bcrypt I had to use it with promise like below async getUser(email: String, password: String) { let user: User[] | User | null = await this.userModel.find({ email }); user = user.length && user[0]; if (user) { return bcrypt .compare(password, user.password) .then((res: any) => { if (res) { return…