oidc-react-routes

0.1.10 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i oidc-react-routes

Weekly Downloads

1

Version

0.1.10

License

ISC

Last publish

Collaborators

  • seanpower
  • johnfliu