React component (AuthProvider) to provide OpenID Connect and OAuth2 protocol support. Has hooks π
Based on oidc-client-js.
Install packages by running:
$ npm install oidc-react...
import{AuthProvider}from'oidc-react';constoidcConfig={onSignIn: ()=>{// Redirect?},authority: 'https://oidc.io/oauth',clientId: 'this-is-a-client-id',redirectUri: 'https://my-app.com/'};constRoutes=()=>(<AuthProvider{...oidcConfig}><Switch><Routeexactpath="/"><Dashboard/></Route>
...
</Switch></AuthProvider>);Apart from this README, you can find details and examples of using the SDK in the following places:
We love to get help π Read more about how to get started in CONTRIBUTING π³
