Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 28, 2024 via pnpm

openid-client 5.5.0

OpenID Connect Relying Party (RP, Client) implementation for Node.js runtime, supports passportjs
Package summary
Share
0
issues
2
licenses
4
MIT
2
ISC
Package created
8 Jul 2016
Version published
8 Sep 2023
Maintainers
1
Total deps
6
Direct deps
4
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
4 Packages, Including:
jose@4.15.5
object-hash@2.2.0
oidc-token-hash@5.0.3
openid-client@5.5.0

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
2 Packages, Including:
lru-cache@6.0.0
yallist@4.0.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

4
All Dependencies CSV
ⓘ This is a list of openid-client 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
jose4.15.5535.58 kBMIT
prod
lru-cache6.0.05.65 kBISC
prod
object-hash2.2.017.85 kBMIT
prod
oidc-token-hash5.0.33.59 kBMIT
prod

Visualizations

Frequently Asked Questions

What does openid-client do?

The openid-client npm package provides an implementation of OpenID Relying Party (RP, Client) for the Node.js runtime. It supports various OpenID Connect/OAuth2.0 specifications such as OpenID Connect Core 1.0, OpenID Connect Discovery 1.0, RFC7009 - OAuth 2.0 Token revocation, RFC8628 - OAuth 2.0 Device Authorization Grant (Device Flow), and more. The package assists in consuming OpenID Connect Authorization Server responses and wrapping around requests to its endpoints.

How do you use openid-client?

Installing and using openid-client is straightforward with npm. First, install the package:

npm install openid-client

Once installed, you can require the package and use its various functionalities in your Node.js application. Here are examples for different use cases:

Discover an Issuer configuration using its published .well-known endpoints:

import { Issuer } from 'openid-client';

const googleIssuer = await Issuer.discover('https://accounts.google.com');
console.log('Discovered issuer %s %O', googleIssuer.issuer, googleIssuer.metadata);

Authorization Code Flow:

import { generators } from 'openid-client';

const client = new googleIssuer.Client({
  client_id: 'your_client_id',
  client_secret: 'your_secret_key',
  redirect_uris: ['http://localhost:3000/cb'],
  response_types: ['code'],
});
const code_verifier = generators.codeVerifier();
const code_challenge = generators.codeChallenge(code_verifier);

Multiple other examples for Authorization Code Flow, Implicit ID Token Flow, Device Authorization Grant (Device Flow) can be found in the package’s readme file.

Where are the openid-client docs?

For a comprehensive understanding of the openid-client npm package, you can review its official documentation on GitHub. The documentation covers various aspects such as Issuer, Client, Customizing, TokenSet, Strategy, generators, and errors.