1.1.0 • Published 6 years ago

react-context-oidc v1.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

react-context-oidc

Build Status

Oidc Integration for react using Context API. Inspired by the Redux OIDC Package this package wrap the Oidc client in order to easily use it in Reduxless React application.

Description

This package handles oidc-client package in a react application. It enables react applications to connect with an external login, and protect the fully application or just few routes or component. The packages proposes the following features :

  • AuthenticationProvider : Api Context Provider to initate the package (usually in index.js)
  • AuthenticationConsummer : to manipulate some oidc objects and functions
  • OidcSecure : A component to protect anothers components.
  • withOidcSecure : A Hoc to protect routes or components
  • Helpers to manage oidc client

Installation

npm install -save react-context-oidc

Peer dependencies

This package wraps oidc-client-js Oidc-client is required to use the package :

npm install --save oidc-client

To work with API Context, react>=16.3 and react-router are required.

Documentation

What's next ?

In the next releases we will propose :

  • Type definition for typescript using.