NodeJS JWT Authentication | Refresh Token | MongoDB | Redis
#NodeJS #JWT #Redis
In this video, I will be showing how you can create JWT based authentication in NodeJS. We will create access and refresh token, and MongoDB will be used to save user data, and Redis will be used for storing Refresh Token and blacklisted access tokens.
Redis VS Code extension: https://marketplace.visualstudio.com/items?itemName=cweijan.vscode-mysql-client2
Git Repo: https://github.com/Sid-Shanker/jwt-auth-nodejs
Chapters:
0:00 Intro
0:37 What we will cover in this tutorial
1:00 P1: Project Setup
5:11 P1: Create Express Web Server
6:41 P1: Create Login route and logic
16:03 P1: Generating JWT access token
34:46 P1: Refresh Token Generation Strategy
37:55 P1: Implement Refresh Token
1:06:23 P2: Refactoring, MongoDB and Redis store
1:34:36 P2: Creating Redis Store
2:11:43 P2: Testing and debugging
Comments are closed.