Hash a password with bcrypt

This example shows you how to use bcryptarrow-up-right to convert a password field into unreadable strings of characters.

Requirements

How it works

Directory: /models

This directory contains the users.js file where the model is declared.

In this example, we're using a custom setterarrow-up-right for the password attribute of the users models.

circle-exclamation

Last updated

Was this helpful?