Get 20% off all career paths from fullstack to AI
Power BI Fundamentals - Create visualizations and dashboards from scratch
Overview
Google, IBM & Meta Certificates — All 10,000+ Courses at 40% Off
One annual plan covers every course and certificate on Coursera. 40% off for a limited time.
Get Full Access
Learn to build a Node.js API with JWT authentication in this comprehensive tutorial. Create a secure authentication system using MongoDB, Mongoose, bcryptjs, and JSON Web Tokens. Set up an Express server, connect to a database, create user models, and implement user registration with password hashing. Explore validation using Joi, set up login routes, and create private routes protected by JWT. Master the essentials of building a robust authentication system for your Node.js applications.
Syllabus
Introduction
Setting up express
Connecting to a database
.env files
Creating models in mongoose
Registering a user
Validation with Joi
Hashing passwords
Setting up the login route
Adding jsonwebtokens to our auth
Creating private routes with jwt
Taught by
developedbyed