auth0-react
OfficialSecurely add Auth0 auth to React SPAs.
Authorauth0
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Auth0 React Integration eliminates the guesswork of wiring login flows in Vite or Create React App SPAs by describing how to configure domain and client ID environment variables, wrap the root with Auth0Provider, and rely on useAuth0 hooks for session state and protected routes.
Core Features & Use Cases
- SDK Installation & Environment Setup: Follow the Setup Guide in references/setup.md to install @auth0/auth0-react, choose between automated CLI commands or manual .env values, and keep VITE_/REACT_APP_ prefixes aligned with the build tool.
- Provider & Hook Integration: Wrap src/main.tsx or src/index.tsx with Auth0Provider, pass redirect_uri and authorizationParams, and use useAuth0 in components for login, logout, loading states, and guarding routes as shown in references/integration.md.
- Use Case & Advanced Patterns: Protect dashboards or customer portals, integrate getAccessTokenSilently for API calls, and reference references/api.md for MFA support, token management, and error handling to keep every SPA component secure.
Quick Start
Use the auth0-react skill to install @auth0/auth0-react, configure your VITE or CRA environment variables, wrap the entry point with Auth0Provider, and verify login/logout through the Auth0 Universal Login redirect flow.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: auth0-react Download link: https://github.com/auth0/docs-v2/archive/main.zip#auth0-react Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.