react-context-oidc

1.1.0 • Public • Published

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.

Package Sidebar

Install

npm i react-context-oidc

Weekly Downloads

6

Version

1.1.0

License

MIT

Unpacked Size

438 kB

Total Files

69

Last publish

Collaborators

  • oyouf