YoVDO

React Persistent User Login Authentication with JWT Tokens

Offered By: Dave Gray via YouTube

Tags

React Courses Web Development Courses User Authentication Courses

Course Description

Overview

Learn how to implement persistent user login authentication with JWT tokens in a React application. Discover secure methods for handling authentication without storing tokens in local or session storage. Explore the creation of a PersistLogin component, updating the useRefreshToken hook, and addressing security issues. Implement a logout functionality, test various scenarios including expired tokens, and add a "Trust Device" feature. Master the techniques to maintain user authentication across app refreshes and revisits while ensuring security best practices.

Syllabus

Intro
Welcome Discussion
Current state of the app
Why want a persistent login?
PersistLogin component
useRefreshToken update
Add PersistLogin to App
Test the Persistent Login
Security Issue #1
useLogout hook
Add logout to Home
Test with no refresh cookie
Test with a refresh token
Test with an expired refresh token
Security Issue #2
Adding new state to AuthProvider
PersistLogin update
Login update
Test Trust Device toggle
Fix a memory leak


Taught by

Dave Gray

Related Courses

Software as a Service
University of California, Berkeley via Coursera
Intro to Computer Science
University of Virginia via Udacity
Web Development
Udacity
Software Engineering for SaaS
University of California, Berkeley via Coursera
CS50's Introduction to Computer Science
Harvard University via edX