# oidc-client-ts

OpenID Connect (OIDC) and OAuth2 protocol support for browser-based JavaScript applications

Repository: https://github.com/authts/oidc-client-ts
Canonical: https://ross.abutalabs.com/products/oidc-client-ts
Homepage: https://authts.github.io/oidc-client-ts/
Language: TypeScript
License: Apache-2.0
License Family: permissive
Topics: oidc, oidc-client, typescript
Last push: 2026-06-24T14:31:33+00:00
Link (homepage): https://authts.github.io/oidc-client-ts/

## Health v2 (maintenance only)
Score: 82/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 89, release rhythm 62, longevity 100
- inputs: {"age_days": 1878, "days_push": 70, "days_rel": 173, "gap_med": 51.0, "n_releases_24m": 9}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1944, forks 271 (observed 2026-08-28T04:05:57.622715+00:00)

## What it is
oidc-client-ts is a TypeScript library providing OpenID Connect (OIDC) and OAuth2 protocol support for browser-based JavaScript applications, including user session and access token management. It is an actively maintained fork of the discontinued oidc-client-js, with a companion react-oidc-context package offering React context-based state management for authentication.

## Use cases
- add OIDC login to a single-page application
- implement OAuth2 authorization code flow with PKCE in the browser
- manage access tokens and silent refresh in a JavaScript app
- authenticate a React app against an identity provider
- sign users in and out with an OpenID Connect provider
- handle refresh tokens and iframe-based silent renew
- migrate from the deprecated oidc-client-js library

## When to choose
- you need a spec-compliant, browser-side OIDC/OAuth2 client in TypeScript
- your SPA uses authorization code flow with PKCE against providers like Auth0, Keycloak, or IdentityServer
- you want React integration via context API
- you need session and token management without a full framework

## When to avoid
- you need the implicit grant, which is no longer supported
- you need server-side or native mobile OAuth flows rather than browser-based ones
- you want a batteries-included UI with login screens rather than a protocol library
- you need OAuth 2.0 grants outside the OAuth 2.1 trajectory

## Facets
- artifact type: library
- maturity: active
- function: auth, http-client, sdk
- domain: security, web-development, frontend, apis
- platform: browser, cross-platform
- tags: oidc, oauth2, openid-connect, authentication, pkce, token-management, react, session-management, browser-based, nodejs, typescript

## Member repositories
- authts/oidc-client-ts (main) score 82
- authts/react-oidc-context (plugin) score 77

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:57.622715+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-30T03:07:59.239278+00:00, confidence not recorded.
  - readme: https://github.com/authts/oidc-client-ts (fetched 2026-08-28T04:05:57.622715+00:00, sha 9f8a6ed17be3)
  - homepage: https://authts.github.io/oidc-client-ts/ (fetched 2026-08-29T10:47:44.915221+00:00, sha ed266178e0b9)
  - registry_npm: https://registry.npmjs.org/oidc-client-ts (fetched 2026-08-29T10:47:44.924627+00:00, sha c1cac5186a4b)
  - registry_npm: https://registry.npmjs.org/react-oidc-context (fetched 2026-08-29T10:47:44.926556+00:00, sha 92f9fc96737a)
- Data as of 2026-08-30T08:39:29.467469+00:00.
