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

YouTube

React Login Authentication with JWT Access, Refresh Tokens, Cookies and Axios

Dave Gray via YouTube

Overview

Learn how to implement React login authentication using JWT access and refresh tokens, cookies, and Axios in this comprehensive tutorial. Explore the process of creating secure user authentication, handling token storage, and making authenticated API requests. Discover the advantages of using secure cookies over localStorage for token storage, and gain insights into implementing a robust authentication system. Build a Users component, create custom hooks for token refresh and private Axios instances, and learn to handle expired tokens effectively. Master the intricacies of JWT authentication strategy and enhance your React application's security.

Syllabus

Intro
Welcome Discussion
JWT Authentication
Update NPM Packages
Users Component
Users Request
Requests Needs the Access Token
useRefreshToken hook
Testing useRefreshToken
Private Axios Instance
useAxiosPrivate with interceptors
Updating the Users component
Handling an expired refresh token
JWT Strategy Revisited

Taught by

Dave Gray

Reviews

Start your review of React Login Authentication with JWT Access, Refresh Tokens, Cookies and Axios

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.