Hash a password with bcrypt
Last updated
Last updated
This example shows you how to use bcrypt to convert a password field into unreadable strings of characters.
An admin backend running on forest-express-sequelize
bcrypt npm package
This directory contains the users.js
file where the model is declared.
In this example, we're using a custom setter for the password attribute of the users
models.
The above example involving password handling, although much better than simply storing the password in plaintext, are far from perfect security. Handling passwords properly is hard, everything here is just for the sake of an example to show Sequelize functionality.