React to Authentication with Hooks
summary
A runnable React + TypeScript app (React Router 6) and Express backend shows Auth0 integration end to end: clone from developer.auth0.com, set DOMAIN/CLIENT_ID/AUDIENCE in .env, install auth0-react and server middleware, click login to redirect to Auth0 and return to /profile where ID and access tokens are decoded. getAccessTokenSilently adds a Bearer header to axios for protected routes and Express middleware verifies the JWT, so the demo actually works, uses jwt.io for decoding and auth0-react hooks.
AI-written summary · about
chapters (12)
- 0:00Introduction and background
- 1:51Authentication basics
- 3:59Setting up the demo app
- 6:46Creating Auth0 account
- 8:12Configuring environment variables
- 11:05Live login demo
- 13:51React hooks for auth
- 17:51Customizing login page
- 19:16JSON Web Tokens explained
- 23:34Access tokens and APIs
- 25:43Authorization on backend
- 26:49Summary and resources
