Tuesday, 5 May 2020

Bcrypt blocks post request?

Im saving user in firebase it worked fine before i added bcrypt now when i make post request it dosent go trough and it times out no erros. I also tried doing it directly in the controller but same reslult.​My service for saving user:SaveUser(User) { let dbContext = new DbContext().Initialize("users"); bcrypt.hash(password, 12, (err, hash) => { if (err) return console.log(err); dbContext.add({ username: User.username, email: User.email, password: hash, created: User.created, isAdmin: true }) }) }

Submitted May 05, 2020 at 09:09PM by draganov11

No comments:

Post a Comment