Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

MERN Stack Authentication with JWT Access, Refresh Tokens, Cookies

Dave Gray via YouTube

Overview

Google, IBM & Meta Certificates – 40% Off
One Coursera Plus subscription covers most Professional Certificates on Coursera.
Unlock All Certificates
This course adds authentication and authorization to a MERN REST API using JWT access and refresh tokens, secure cookies, authentication routes, controllers, and verification middleware. It tests login, refresh, logout, and protected endpoints with Postman and assumes prior Node.js, React, and Redux familiarity.

Syllabus

Intro
Welcome
Quick lessons recap
Authentication vs Authorization
Starter Code
Add auth routes to server
Auth routes router
Rate limiting middleware
Auth controller
Adding controller methods to auth routes
Understanding the JWT auth process
Create token secrets with Node.js
login method in auth controller
refresh method in auth controller
logout method in auth controller
Create middleware to verify JWTs
Apply verifyJWT middleware to routes
Test the login endpoint with Postman
Test the refresh endpoint with Postman
Test the logout endpoint with Postman
Test the verifyJWT middleware with Postman

Taught by

Dave Gray

Reviews

Start your review of MERN Stack Authentication with JWT Access, Refresh Tokens, Cookies

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.