What problem does it solve?
Provides step-by-step guidance and automation to add secure authentication to browser-based single-page applications that do not use framework-specific Auth0 wrappers, removing guesswork around client setup, redirect handling, token management, and environment configuration.
Core Features & Use Cases
- SDK installation guidance for @auth0/auth0-spa-js and guidance for CDN usage when no bundler is present.
- Client initialization patterns, redirect callback handling, login/logout flows, access token acquisition, and optional refresh token rotation for persistent sessions.
- Automated bootstrap scripts to create Auth0 SPA clients, update connections, and write environment variables safely, plus testing and troubleshooting checklists for common build and runtime errors.
- Use case: Add Auth0 to a Vanilla JS or Svelte app, initialize the client from environment variables, handle the OAuth redirect callback, and call a protected API with a silently obtained token.
Quick Start
Initialize the Auth0 SPA JS client using createAuth0Client with your VITE_AUTH0_DOMAIN and VITE_AUTH0_CLIENT_ID environment variables and verify login, logout, and token retrieval.