Overview
Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
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