Code Monkey home page Code Monkey logo

oidc-react's Introduction

OIDC React

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

Language grade: JavaScript codecov Maintainability

oidc-react logo

About

React component (AuthProvider) to provide OpenID Connect and OAuth2 protocol support. Has hooks ๐ŸŽ‰

Based on oidc-client-ts.

Quickstart

Install packages by running:

$ npm install oidc-react

Usage

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

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 ๐ŸŒณ

oidc-react's People

Contributors

astahmer avatar bjerk-bot avatar braaar avatar dannyheard7 avatar ddp34 avatar dependabot-preview[bot] avatar dependabot[bot] avatar ed-sparkes avatar freefrags avatar hmvp avatar laurakutovaja avatar lclc98 avatar lucaskuratani avatar m-irc-o avatar maxinger15 avatar miestr avatar mindplay-dk avatar narmdo avatar pamapa avatar peterhueer94 avatar powersource avatar pseudoramble avatar ryancole avatar semantic-release-bot avatar simenandre avatar tnovau avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.