Skip to content

Installation

Terminal window
npm install oidc-js-react

Each framework package includes oidc-js and oidc-js-core as dependencies — you don’t need to install them separately.

If you’re not using a framework adapter (or building your own), install the browser client directly:

Terminal window
npm install oidc-js

For server-side usage or building custom adapters:

Terminal window
npm install oidc-js-core
  • Browser: Any modern browser with Web Crypto API support (all evergreen browsers)
  • Node.js: 18+ (Web Crypto API available globally)
  • TypeScript: 5.0+ (optional — the library ships with type declarations)
oidc-js-core → Pure functions, no IO, no fetch
└── oidc-js → Browser client: core + fetch + sessionStorage
├── oidc-js-react → React context, hooks, and guards
├── oidc-js-vue → Vue plugin, composables, and guards
├── oidc-js-svelte → Svelte 5 components and context
├── oidc-js-angular → Angular service, guards, and DI
├── oidc-js-solid ��� Solid signals and components
├── oidc-js-preact → Preact hooks and components
├── oidc-js-lit → Lit reactive controllers
└── oidc-js-kasper → Kasper signals and components

Each layer adds only what it needs. The core has zero dependencies. The browser client adds fetch and sessionStorage. Framework adapters add their reactivity layer.