MERN Authentication Tutorial (Net Ninja)
By Net Ninja
- Course audio
- Course audio: English
- Level
- Advanced
- Length
- 15 lessons
What you'll be able to do
- Hash passwords and validate sign-up data on the server
- Issue and verify JSON Web Tokens to protect API routes
- Manage auth state in React with context and custom hooks
About this course
Net Ninja adds user authentication to a MERN app step by step. Starting from a starter project, lessons build user routes, controller and model, sign-up with hashed passwords, email and password validation, JSON Web Tokens in theory and practice, and login. On the React side learners create an auth context, login and sign-up forms, and useSignup, useLogout and useLogin hooks, then set the initial auth state, protect API routes and make authorised requests. It suits learners who have built a basic MERN app.
Before you start: Basic React (components, props, state); Basic Node.js, Express and MongoDB
Syllabus
Sabaq lists the first 15 videos of this playlist; the rest continue on YouTube. Full playlist on YouTube
- 1MERN Authentication Tutorial #1 - Intro & Starter Project
- 2MERN Authentication Tutorial #2 - User Routes, Controller & Model
- 3MERN Authentication Tutorial #3 - Signing Up & Hashing Passwords
- 4MERN Authentication Tutorial #4 - Email & Password Validation
- 5MERN Authentication Tutorial #5 - JSON Web Tokens (theory)
- 6MERN Authentication Tutorial #6 - Signing Tokens
- 7MERN Authentication Tutorial #7 - Logging Users In
- 8MERN Authentication Tutorial #8 - React Auth Context
- 9MERN Authentication Tutorial #9 - Login & Signup Forms
- 10MERN Authentication Tutorial #10 - Making a useSignup Hook
- 11MERN Authentication Tutorial #11 - Making a useLogout Hook
- 12MERN Authentication Tutorial #12 - Making a useLogin Hook
- 13MERN Authentication Tutorial #13 - Setting the Initial Auth Status
- 14MERN Authentication Tutorial #14 - Protecting API Routes
- 15MERN Authentication Tutorial #15 - Making Authorized Requests
What to take next
Related courses
Videos by Net Ninja, played from their official YouTube channel. Subscribe on YouTube
Official upload by the teacher or institution on their own channel, shown with YouTube's embedded player.
Sabaq lists the first 15 videos of this playlist; the rest continue on YouTube. Full playlist on YouTube
Lessons last checked Oct 2026. Course summary and lesson structure by Sabaq.
Report a problem or a rights request
