# auth0/auth0-spa-js

Auth0 authentication for Single Page Applications (SPA) with PKCE

Repository: https://github.com/auth0/auth0-spa-js
Canonical: https://ross.abutalabs.com/products/auth0-spa-js
Language: TypeScript
License: MIT
License Family: permissive
Topics: auth0-js, pkce, openid-connect, oauth2, spa, dx-sdk, javascript, auth0
Last push: 2026-09-02T22:21:17+00:00

## Health v2 (maintenance only)
Score: 98/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 100, release rhythm 95, longevity 100
- inputs: {"age_days": 2709, "days_push": 0, "days_rel": 36, "gap_med": 7.0, "n_releases_24m": 39}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1009, forks 429 (observed 2026-09-03T02:15:09.358599+00:00)

## What it is
Auth0's official JavaScript SDK for adding authentication to Single Page Applications using the Authorization Code Grant flow with PKCE. It provides login, logout, token renewal, and user profile retrieval via the Auth0 platform.

## Use cases
- add login to a single page application
- implement OAuth2 PKCE flow in a browser app
- renew access tokens silently in an SPA
- log users in with Auth0 universal login
- get user profile information after authentication
- handle logout and session management in an SPA

## When to choose
- you are building a SPA (React, Vue, vanilla JS) and use Auth0 as your identity provider
- you need a standards-compliant OAuth2/OIDC Authorization Code flow with PKCE in the browser
- you want silent token renewal and session handling handled for you

## When to avoid
- you are not using Auth0 as your identity provider
- you are building a server-side or native mobile app (use the appropriate Auth0 SDK instead)
- you need a generic OAuth library not tied to Auth0

## Facets
- artifact type: library
- maturity: active
- function: auth, authorization, sdk
- domain: web-development, frontend, security, apis
- platform: browser
- tags: auth0, oauth2, openid-connect, pkce, single-page-applications, typescript, token-management, login, session-management, javascript, nodejs

## Member repositories
- auth0/auth0-spa-js (main) score 98

## Provenance
- Observed fields: from GitHub, fetched 2026-09-03T02:15:09.358599+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:12:25.456388+00:00, confidence not recorded.
  - readme: https://github.com/auth0/auth0-spa-js (fetched 2026-09-03T02:15:09.358599+00:00, sha 41df23384dfc)
  - registry_npm: https://registry.npmjs.org/auth0-spa-js (fetched 2026-08-29T13:12:27.997389+00:00, sha e958768c8456)
- Data as of 2026-08-30T08:39:29.467469+00:00.
