oidc-react-routes
v0.1.10
Published
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.
Downloads
17
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