
Compare traditional web apps where the server renders full pages and uses cookies to track sessions. Learn how single-page apps delegate authentication to a third-party server to simplify login flows.
discover why cookies fail for single page applications and how OAuth 2.0 uses tokens and an authorization server to secure access, with Auth0 as a delegated solution.
Create your Auth0 account and personal developer tenant, then configure a React single-page app client. Add a callback URL for localhost:3000 and explore options like white list and multi-factor authentication.
Demonstrates building a two-route React app with a protected secret area, login redirect, and logout, showing how authentication gates access and guides navigation between home and secret pages.
Build a basic three-page react app by scaffolding with create react app, wiring state management, props, and routing to render home, secret, and not found pages.
Install the Auth0 npm package, configure domain, client ID, redirect URI, and audience, then implement a login flow that redirects to Auth0, processes tokens, and protects a secret area.
Parse the server response after login with parse hash, extract access and id tokens, and store the expires at value in local storage to support authentication checks for route guarding.
Add a logout button that clears the access token, id token, and expires at from local storage, then redirects to the home page and restricts access to the secret area.
Show profile page by decoding the stored jwt token to reveal user profile data from the payload after login, and display the name or username accordingly.
Complete the course by securing your React applications through router integration, as core concepts remain the same for large applications. Reach out with any questions or comments.
In this course, the students will learn how to build a basic React Js application and how to add authentication to it by using the free Auth0 service. Starting with a blank application from create-react-app, three routes will be added so the users can login, logout and view their profile.