auth0-spa-js
OfficialSecure browser SPAs with Auth0 SPA JS
Authorauth0
Version1.0.0
Installs0
System Documentation
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.
Dependency Matrix
Required Modules
@inquirer/promptsexecaora
Components
scriptsreferences
💻 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-spa-js Download link: https://github.com/auth0/agent-skills/archive/main.zip#auth0-spa-js 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.