JWT Authentication - Node JS and Express Tutorials for Beginners
Offered By: Dave Gray via YouTube
Course Description
Overview
Learn how to implement secure JWT authentication in a Node.js and Express REST API. Explore the process of creating and verifying JSON Web Tokens, applying token verification to routes, and handling token refresh and logout functionalities. Discover best practices to prevent XSS and CSRF attacks, set up environment variables, and configure CORS for secure communication. Gain hands-on experience with cookie management, middleware implementation, and frontend-backend integration for a robust authentication system.
Syllabus
Intro
Welcome
JWT Authentication
Set up
Installing new dependencies
Creating environment variables
Creating JWT tokens at authorization
Creating JWT verification middleware
Applying JWT token verification to specific routes
Applying JWT token verification to many routes
Adding cookie-parser middleware
Creating a refresh token controller
Creating the refresh route
Adding the refresh route to the server
Testing the refresh route
Creating a logout controller
Creating the logout route
Adding the logout route to the server
A Quick Debug
Testing the logout route
Frontend: fetch needs the credentials option
Backend: CORS needs Access-Control-Allow-Credentials
Chrome requires specific cookie options
Taught by
Dave Gray
Related Courses
Master Django by Building Complete RESTful API ProjectUdemy Angular Avanzado: Lleva tus bases al siguiente nivel - MEAN
Udemy Complete Angular 11 - Ultimate Guide - with Real World App
Udemy Node.Js: Learning Koa.Js By Building REST APIs
Udemy MERN Stack Master Course - Building your own Instagram
Udemy