Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

oidc-react-routes

karmadata5ISC0.1.10

This library provides the components that will handle when redirects OAuth issues during a login/renew process. They are exposed as simple React component, and do not impact the architecture of the overall React app.

readme

OAuth Callback Routes

This library provides the components that will handle when redirects OAuth issues during a login/renew process. They are exposed as simple React component, and do not impact the architecture of the overall React app.

Simple Usage

OidcRouter separate the main application and callback pages into different routes, so they do not interfere with one another. Simply use it as the parent component of your main app, as below:

// index.js
import { OidcRouter } from 'oidc-react-routes';
import App from './App';    // assume App is the main application

// here we assume we have configured oidc-client to use /routercallback and /routersilent as the callback routes
ReactDOM.render(
    <OidcRouter callbackPath="/routercallback" silentCallbackPath="/routersilent">
        <App />
    </OidcRouter>,
    document.getElementById('root'));

Other Usage

There will be more documentation on advanced usage of this library