Рет қаралды 39,634
Web Dev Roadmap for Beginners (Free!): 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 ➜ bit.ly/3nGHmNn
🚀 This lesson is part of an Node.js & Express for Beginners tutorial series playlist:
• Node.js Tutorials for ...
🔗 Starter Source Code: github.com/gitdagray/express_mvc
🔗 Completed Source Code: 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: www.npmjs.com/package/bcrypt
How to Safely Store a Password: codahale.com/how-to-safely-st...
MDN: HTTP Response Status Codes: developer.mozilla.org/en-US/d...
📚 More References:
Node.js Official site: nodejs.org
NPM Official site: www.npmjs.com/
Express JS Official site: expressjs.com/
MDN CORS: developer.mozilla.org/en-US/d...
NPM CORS: www.npmjs.com/package/cors
✅ Follow Me:
Twitter: / yesdavidgray
LinkedIn: / davidagray
Blog: yesdavidgray.com
Reddit: / 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