Web Dev Roadmap for Beginners (Free!): https://bit.ly/DaveGrayWebDevRoadmap

Add user password authentication to your Node.js & Express app. In this tutorial, you will learn how to add user registration and authentication routes. We'll hash and salt passwords user passwords for safe storage, too.

Subscribe https://bit.ly/3nGHmNn

This lesson is part of an Node.js & Express for Beginners tutorial series playlist:
https://www.youtube.com/playlist?list=PL0Zuz27SZ-6PFkIxaJ6Xx_X46avTM1aYw

Starter Source Code: https://github.com/gitdagray/express_mvc

Completed Source Code: https://github.com/gitdagray/user_auth

User Password Authentication | Node.js & Express Tutorials for Beginners

(00:00) Intro
(00:05) Welcome
(00:32) Simulating a users database
(00:57) Two routes are needed
(01:09) Create the register controller
(03:00) Install bcrypt dependency
(04:07) Handle new user request
(07:55) Hash and Salt passwords with bcrypt
(12:34) Create the register route file
(13:50) Add the route to the server
(14:13) Start the dev server
(15:13) Test the register route
(18:21) Create the auth controller
(22:57) Create the auth route file
(23:43) Add the auth route to the server
(24:03) Test the auth route

References:
Bcrypt: https://www.npmjs.com/package/bcrypt
How to Safely Store a Password: https://codahale.com/how-to-safely-store-a-password/
MDN: HTTP Response Status Codes: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status

More References:
Node.js Official site: https://nodejs.org
NPM Official site: https://www.npmjs.com/
Express JS Official site: https://expressjs.com/
MDN CORS: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
NPM CORS: https://www.npmjs.com/package/cors

Follow Me:
Twitter: https://twitter.com/yesdavidgray
LinkedIn: https://www.linkedin.com/in/davidagray/
Blog: https://yesdavidgray.com
Reddit: https://www.reddit.com/user/DaveOnEleven

Was this tutorial about user password authentication with Node.js and Express JS helpful? If so, please share. Let me know your thoughts in the comments.

#user #password #authentication