DEV Community

Discussion on: Safely Storing Passwords in mongoDB Using Bcrypt and a mongoose middleware.

Collapse
 
pixsaoj profile image
Pixsa

How would you add salt to this?

Collapse
 
jhdcruz profile image
Joshua Hero

I believe the Number 8 after user.password is the salt.

Collapse
 
waellomari profile image
Waell Omari

Number 8 is the cost