# redux-oidc

> A package for managing OpenID Connect authentication in redux apps

Latest version **4.0.0-beta1** (published 2019-11-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install redux-oidc
pnpm add redux-oidc
yarn add redux-oidc
bun add redux-oidc
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.0-beta1 |
| Published | 2019-11-10 |
| First published | 2016-04-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 344.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 397 |
| Author | Maximilian Mantz |
| Maintainers | maxmantz |
| Keywords | oidc, redux, react-component, react-redux, openid, oauth2 |

## Links

- npm: https://www.npmjs.com/package/redux-oidc
- Repository: https://github.com/maxmantz/redux-oidc
- Homepage: https://github.com/maxmantz/redux-oidc#readme
- Issues: https://github.com/maxmantz/redux-oidc/issues
- npm.io page: https://npm.io/package/redux-oidc

## Recent versions

- 4.0.0-beta1 (latest) — 2019-11-10
- 3.1.7 — 2019-11-06
- 3.1.6 — 2019-11-06
- 3.1.5 — 2019-08-09
- 3.1.4 — 2019-07-29
- 3.1.3 — 2019-07-15
- 3.1.2 — 2019-03-13
- 3.1.1 — 2019-03-07
- 3.1.0 — 2018-10-13
- 3.0.2 — 2018-07-19
- 3.0.1 — 2018-07-06
- 3.0.0 — 2018-06-19
- 3.0.0-beta.17 — 2018-04-11
- 3.0.0-beta.16 — 2018-02-22
- 3.0.0-beta.15 — 2018-02-22
- … 56 more at https://npm.io/package/redux-oidc/versions

## README

# redux-oidc
[![Build Status](https://travis-ci.org/maxmantz/redux-oidc.svg?branch=master)](https://travis-ci.org/maxmantz/redux-oidc)

A package for managing OpenID-Connect authentication in ReactJS / Redux apps. It wraps the popular oidc-client library to redux actions and reducers.

### Description

This package handles [OpenID-Connect](http://openid.net/connect/) authentication in [redux](http://redux.js.org/) apps. It enables redux apps to authenticate with an external OIDC authentication provider and handles the actions of the OpenID [implicit flow](http://openid.net/specs/openid-connect-implicit-1_0.html) or [authorization code flow](https://developer.okta.com/blog/2018/04/10/oauth-authorization-code-grant-type).

It uses the oidc-client-js library to manage OpenID Connect functionality.

It contains the following parts:
- *CallbackComponent*: A react component processing the signin callback from the OpenID-Connect provider,
- *SignoutCallbackComponent*: A react component processing the signout callback from the OpenID-Connect provider,
- *reducers & actions*: reducers and actions to handle OIDC events,
- *helpers*: create helpers to manage the oidc-client-js library

### Installation
`npm install --save redux-oidc`

#### Peer dependencies
This package wraps [oidc-client-js](https://github.com/IdentityModel/oidc-client-js) to use with ReactJS / Redux apps.
Install oidc-client like this:

`npm install --save oidc-client`

In addition there is a peer dependency for [immutable.js](https://facebook.github.io/immutable-js/), if you want to use it.

#### babel-polyfill
You need the [babel-polyfill](https://babeljs.io/docs/usage/polyfill/) in your build configuration for this package to work.


### Version 4 released
*BREAKING CHANGE*: `immutable` is no longer a dependency. If you are using the immutable reducer, please check out the docs.

#### Documentation
You can find the docs for version 3 here:
- [API docs](docs/API.md),
- [actions](docs/Actions.md),
- [example app](https://github.com/maxmantz/redux-oidc-example)

#### Note for react-native users
This library doesn't fully support react-native apps. Please use [this](https://github.com/FormidableLabs/react-native-app-auth) library instead.

### Version 2

Check out the [wiki](https://github.com/maxmantz/redux-oidc/wiki) for further information for Version 2 (deprecated).

### Sample app
There is a sample application demonstrating the use of this package [here](https://github.com/maxmantz/redux-oidc-example).

### Tests
You have to install immutableJS for all the tests to pass: `npm install immutable --no-save`.
Then run `npm run test`.

---
_Source: https://npm.io/package/redux-oidc · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
