DEV Community

Discussion on: 🔥🔥backend for login form. Easy to make fully working form

Collapse
 
tqbit profile image
tq-bit

Conveying the idea of storing passwords in a db looks rather good, but I noticed (at least in the source code), you're not hashing the user's password.

For a productive environment, you might want to consider storing a password hash rather than the raw text in a db. There are plenty of libs to do so, one of which is called bcrypt npmjs.com/package/bcrypt

Collapse
 
chrisczopp profile image
chris-czopp

In this case, there is no need for third-part libraries as there is native node module: nodejs.org/api/crypto.html

Collapse
 
themodernweb profile image
Modern Web

Yup! Its necessary to store password in hash form in DB but this tutorial purpose was to teach how to store and retrieve data from DB with Node.js