oidc-client vs oidc-client-ts vs openid-client vs react-oidc-context
OIDCクライアントライブラリ
oidc-clientoidc-client-tsopenid-clientreact-oidc-context類似パッケージ:

OIDCクライアントライブラリ

OIDC(OpenID Connect)クライアントライブラリは、OpenID Connectプロトコルを使用してユーザー認証を行うためのツールです。これらのライブラリは、OAuth 2.0を基盤とし、ユーザーのIDを確認し、必要な情報を取得するための機能を提供します。これにより、開発者は安全にユーザー認証を実装でき、シングルサインオン(SSO)やユーザー情報の取得が容易になります。

npmのダウンロードトレンド

3 年

GitHub Starsランキング

統計詳細

パッケージ
ダウンロード数
Stars
サイズ
Issues
公開日時
ライセンス
oidc-client02,433-1165年前Apache-2.0
oidc-client-ts01,8821.73 MB13917日前Apache-2.0
openid-client02,318217 kB02ヶ月前MIT
react-oidc-context01,007118 kB8717日前MIT

機能比較: oidc-client vs oidc-client-ts vs openid-client vs react-oidc-context

サポートされている環境

  • oidc-client:

    oidc-clientは、ブラウザ環境で動作するように設計されており、クライアントサイドのアプリケーションに最適です。

  • oidc-client-ts:

    oidc-client-tsもブラウザ環境で動作しますが、TypeScriptでの開発を念頭に置いているため、型安全性を重視する開発者に向いています。

  • openid-client:

    openid-clientは、Node.js環境で動作し、サーバーサイドのOIDCフローを実装するための機能が豊富です。

  • react-oidc-context:

    react-oidc-contextは、Reactアプリケーション専用で、Reactのコンポーネントとして簡単に統合できます。

型安全性

  • oidc-client:

    oidc-clientは、JavaScriptで書かれており、型安全性は提供されていません。

  • oidc-client-ts:

    oidc-client-tsは、TypeScriptで書かれているため、型安全性があり、開発中のエラーを早期に検出できます。

  • openid-client:

    openid-clientは、JavaScriptで書かれており、型安全性は提供されていませんが、柔軟な設定が可能です。

  • react-oidc-context:

    react-oidc-contextは、TypeScriptを使用している場合、型安全性を活かした開発が可能です。

APIのシンプルさ

  • oidc-client:

    oidc-clientは、シンプルで直感的なAPIを提供しており、すぐに使い始めることができます。

  • oidc-client-ts:

    oidc-client-tsもシンプルなAPIを提供しますが、TypeScriptの特性を活かした使い方が求められます。

  • openid-client:

    openid-clientは、詳細な設定が可能ですが、その分APIは複雑になることがあります。

  • react-oidc-context:

    react-oidc-contextは、ReactのコンテキストAPIを利用しているため、React開発者にとって使いやすいAPI設計になっています。

ドキュメントとサポート

  • oidc-client:

    oidc-clientは、豊富なドキュメントがあり、コミュニティのサポートも充実しています。

  • oidc-client-ts:

    oidc-client-tsもドキュメントが整備されており、TypeScriptに特化した情報が得られます。

  • openid-client:

    openid-clientは、詳細なドキュメントがあり、サーバーサイドのOIDC実装に関する情報が豊富です。

  • react-oidc-context:

    react-oidc-contextは、Reactに特化したドキュメントがあり、React開発者にとって理解しやすい内容になっています。

認証フローのサポート

  • oidc-client:

    oidc-clientは、Authorization Code FlowやImplicit Flowなど、一般的なOIDC認証フローをサポートしています。

  • oidc-client-ts:

    oidc-client-tsも同様に、一般的なOIDC認証フローをサポートしています。

  • openid-client:

    openid-clientは、より多くのOIDCフローをサポートしており、カスタマイズ性が高いです。

  • react-oidc-context:

    react-oidc-contextは、Reactアプリケーションに特化した認証フローのサポートを提供し、簡単に統合できます。

選び方: oidc-client vs oidc-client-ts vs openid-client vs react-oidc-context

  • oidc-client:

    oidc-clientは、ブラウザ環境でのOIDC認証を簡単に実装したい場合に適しています。軽量で、シンプルなAPIを提供し、さまざまなOIDCプロバイダーと互換性があります。

  • oidc-client-ts:

    oidc-client-tsは、TypeScriptでの開発を重視している場合に選択するべきです。型安全性を提供し、TypeScriptの機能を活かした開発が可能です。

  • openid-client:

    openid-clientは、Node.js環境でのOIDC認証を行うための強力なライブラリです。サーバーサイドでのOIDCフローを実装する際に最適で、詳細な設定が可能です。

  • react-oidc-context:

    react-oidc-contextは、Reactアプリケーションに特化したOIDCクライアントライブラリで、ReactのコンテキストAPIを利用して、認証状態を管理するのに便利です。Reactのコンポーネントライフサイクルに統合されているため、使いやすさが向上します。

oidc-client のREADME

npm package

oidc-client

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.

Install

Node.js

Node.js v4.4 or later required.

NPM

npm install oidc-client --save

NOTE: if you're not already using babel-polyfill make sure you run npm install --save babel-polyfill as well. Then include it in your build.

CommonJS

If you don't use a package manager or a module loader, then you can get the library from the dist folder on github here.

Including in the browser

If you intend to use this library directly in a browser and are not using UMD/AMD then there is a compiled version in the ~/dist folder. It is already bundled/minified and contains the necessary dependencies and polyfills (mainly for ES6 features such as Promises).

If you are using UMD/AMD and/or you already have included an ES6 polyfill (such as babel-polyfill.js) then you can include the UMD packaged version of the file from the ~/lib folder.

Building the Source

git clone https://github.com/IdentityModel/oidc-client-js.git
cd oidc-client-js
npm install
npm run build

Running the Sample

npm start

and then browse to http://localhost:15000.

Running the Tests

npm test

Docs

Some initial docs are here.

Feedback, Feature requests, and Bugs

All are welcome on the issue tracker.