AI, Data Science & Cloud Certificates from Google, IBM & Meta
Launch Your Cybersecurity Career in 6 Months
Overview
Google, IBM & Meta Certificates – 40% Off
One Coursera Plus subscription covers most Professional Certificates on Coursera.
Unlock All Certificates
This beginner tutorial shows how to add user registration and password authentication to a Node.js and Express API. It creates controllers and routes, uses bcrypt for secure password storage, and tests successful, duplicate, and unauthorized requests.
Syllabus
Intro
Welcome
Simulating a users database
Two routes are needed
Create the register controller
Install bcrypt dependency
Handle new user request
Hash and Salt passwords with bcrypt
Create the register route file
Add the route to the server
Start the dev server
Test the register route
Create the auth controller
Create the auth route file
Add the auth route to the server
Test the auth route
Taught by
Dave Gray