Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bjerkio/oidc-react
React component to provide OpenID Connect and OAuth2 protocol support. 🌳
https://github.com/bjerkio/oidc-react
library oidc-client-js package react sdk
Last synced: 4 days ago
JSON representation
React component to provide OpenID Connect and OAuth2 protocol support. 🌳
- Host: GitHub
- URL: https://github.com/bjerkio/oidc-react
- Owner: bjerkio
- License: mit
- Created: 2020-04-09T09:17:41.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-13T17:35:18.000Z (9 months ago)
- Last Synced: 2024-04-14T08:03:26.798Z (9 months ago)
- Topics: library, oidc-client-js, package, react, sdk
- Language: TypeScript
- Homepage:
- Size: 2.47 MB
- Stars: 310
- Watchers: 6
- Forks: 68
- Open Issues: 32
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# OIDC React
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![code style: airbnb](https://img.shields.io/badge/eslint-airbnb-ff5a5f.svg?style=flat-square)](https://github.com/prettier/prettier)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat-square)](http://commitizen.github.io/cz-cli/)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release)
[![codecov](https://codecov.io/gh/bjerkio/oidc-react/branch/master/graph/badge.svg)](https://codecov.io/gh/bjerkio/oidc-react)![oidc-react logo](assets/logo.jpg)
## About
React component (AuthProvider) to provide OpenID Connect and OAuth2 protocol
support. Has [hooks](guides/HOOKS.md) 🎉Based on [oidc-client-ts](https://github.com/authts/oidc-client-ts).
## Quickstart
Install packages by running:
```shell
$ npm install oidc-react
```## Usage
```tsx
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 = () => (
...
);
```# Documentation
Apart from this README, you can find details and examples of using the SDK in
the following places:- [SDK Documentation](docs/README.md)
- [Guides](guides/)
- [Example repository](https://github.com/simenandre/example-oidc-react)
- [oidc-client-ts Documentation](https://authts.github.io/oidc-client-ts/)## Contribute & Disclaimer
We love to get help 🙏 Read more about how to get started in
[CONTRIBUTING](CONTRIBUTING.md) 🌳