# oidc-client-ts

> OpenID Connect (OIDC) & OAuth2 client library

Latest version **3.5.0** (published 2026-03-13) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install oidc-client-ts
pnpm add oidc-client-ts
yarn add oidc-client-ts
bun add oidc-client-ts
```

## Health

**Score 70/100 (B)** — status: stable.

Positive: has types; esm support; no vulnerabilities; has provenance; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 3.5.0 |
| Published | 2026-03-13 |
| First published | 2021-07-21 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=18 |
| Dependencies | 1 |
| Unpacked size | 1.7 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 1952 |
| Maintainers | pamapa, pascalluginbuehl |
| Keywords | authentication, oauth2, oidc, openid, OpenID Connect |

## Links

- npm: https://www.npmjs.com/package/oidc-client-ts
- Repository: https://github.com/authts/oidc-client-ts
- Homepage: https://github.com/authts/oidc-client-ts#readme
- Issues: https://github.com/authts/oidc-client-ts/issues
- npm.io page: https://npm.io/package/oidc-client-ts

## Dependencies (1)

- [jwt-decode](https://npm.io/package/jwt-decode.md) ^4.0.0

## Alternatives

- [@clerk/clerk-expo](https://npm.io/package/@clerk/clerk-expo.md) — 133.6K weekly downloads
- [@pothos/plugin-authz](https://npm.io/package/@pothos/plugin-authz.md) — 12.4K weekly downloads
- [@bounded-sh/client](https://npm.io/package/@bounded-sh/client.md) — 3.2K weekly downloads
- [@luigi-project/plugin-auth-oauth2](https://npm.io/package/@luigi-project/plugin-auth-oauth2.md) — 2.3K weekly downloads
- [@nocobase/plugin-verification](https://npm.io/package/@nocobase/plugin-verification.md) — 2.0K weekly downloads

## Recent versions

- 3.5.0 (latest) — 2026-03-13
- 2.5.0 (previous) — 2026-01-05
- 3.3.0-rc.0 (next) — 2025-05-26
- 3.4.1 — 2025-11-17
- 3.4.0 — 2025-11-10
- 3.3.0 — 2025-06-16
- 3.2.1 — 2025-05-05
- 3.2.0 — 2025-03-12
- 3.1.0 — 2024-10-04
- 2.4.1 — 2024-10-04
- 3.1.0-rc.1 — 2024-07-18
- 3.1.0-rc.0 — 2024-06-25
- 3.0.1 — 2024-02-08
- 3.0.0 — 2024-01-30
- 3.0.0-rc.2 — 2024-01-16
- … 30 more at https://npm.io/package/oidc-client-ts/versions

## README

# oidc-client-ts

[![Stable Release](https://img.shields.io/npm/v/oidc-client-ts.svg)](https://npm.im/oidc-client-ts)
[![CI](https://github.com/authts/oidc-client-ts/actions/workflows/ci.yml/badge.svg)](https://github.com/authts/oidc-client-ts/actions/workflows/ci.yml)
[![Codecov](https://img.shields.io/codecov/c/github/authts/oidc-client-ts)](https://app.codecov.io/gh/authts/oidc-client-ts)

Library to provide OpenID Connect (OIDC) and OAuth2 protocol support for
client-side, browser-based JavaScript client applications. Also included is
support for user session and access token management.

This project is a fork of
[IdentityModel/oidc-client-js](https://github.com/IdentityModel/oidc-client-js)
which halted its development in June 2021. It has since been ported to
TypeScript here with a similar API for the initial 2.0 release. Going forward,
this library will focus only on protocols that continue to have support in
[OAuth 2.1](https://oauth.net/2.1/). As such, the implicit grant is not
supported by this client. Additional migration notes from `oidc-client` are
available [here](docs/migration.md).

**Contributions and help are greatly appreciated!**

Implements the following OAuth 2.0 protocols and supports
[OpenID Connect Core 1.0](https://openid.net/specs/openid-connect-core-1_0.html):

- [Authorization Code Grant with Proof Key for Code Exchange (PKCE)](docs/protocols/authorization-code-grant-with-pkce.md)
- [Authorization Code Grant](docs/protocols/authorization-code-grant.md)
- [Resource Owner Password Credentials (ROPC) Grant](docs/protocols/resource-owner-password-credentials-grant.md)
- [Refresh Token Grant](docs/protocols/refresh-token-grant.md)
- [Silent Refresh Token in iframe Flow](docs/protocols/silent-refresh-token-in-iframe-flow.md)

## Table of Contents

- [Documentation](https://authts.github.io/oidc-client-ts/)
- [Installation](#installation)
- [Building the Source](#building-the-source)
- [Contributing](#contributing)
- [License](#license)

## Installation

Using [npm](https://npmjs.org/)

```sh
$ npm install oidc-client-ts --save
```

## Building the Source

```sh
$ git clone https://github.com/authts/oidc-client-ts.git
$ cd oidc-client-ts
$ npm install
$ npm run build
```

### Running the Sample

**Parcel project**

```sh
$ cd samples/Parcel
$ npm install
$ npm run start
```

and then browse to [http://localhost:1234](http://localhost:1234).

**Angular app**

can be found [here](https://github.com/authts/sample-angular-oidc-client-ts).

### Running the Tests

```sh
$ npm test
```

## Contributing

We appreciate feedback and contribution to this repo!

## License

This project is licensed under the Apache-2.0 license. See the
[LICENSE](https://github.com/authts/oidc-client-ts/blob/main/LICENSE) file for
more info.

---
_Source: https://npm.io/package/oidc-client-ts · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
