2.1.0 • Published 2 years ago

oidc-react-metadata v2.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

OIDC React

code style: prettier code style: airbnb Commitizen friendly semantic-release Build & Deploy

Language grade: JavaScript codecov Maintainability

oidc-react logo

This package is a fork of oidc-react with metada parameter created at PR 715 created by user Adam (innesian)

About

React component (AuthProvider) to provide OpenID Connect and OAuth2 protocol support. Has hooks 🎉

Based on oidc-client-js.

Quickstart

Install packages by running:

$ npm install oidc-react-metadata

Usage

...
import { AuthProvider } from 'oidc-react-metadata';

const oidcConfig = {
  onSignIn: () => {
    // Redirect?
  },
  authority: 'https://oidc.io/oauth',
  clientId: 'this-is-a-client-id',
  redirectUri: 'https://my-app.com/'
};

const Routes = () => (
  <AuthProvider {...oidcConfig}>
    <Switch>
      <Route exact path="/">
        <Dashboard />
      </Route>
      ...
    </Switch>
  </AuthProvider>
);

Documentation

Apart from this README, you can find details and examples of using the SDK in the following places:

Contribute & Disclaimer

We love to get help 🙏 Read more about how to get started in CONTRIBUTING 🌳

2.1.0

2 years ago

2.0.0

2 years ago

1.0.5

2 years ago

1.0.0

2 years ago