<commit_before># 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.

### Installation
`npm install --save redux-oidc`

#### Peer dependency
This package has [oidc-client-js](https://github.com/IdentityModel/oidc-client-js) as its peer dependency.
In order to install this run:

`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.

### 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).

It uses the oidc-client-js library to manage OpenID Connect functionality.

It contains the following parts:
- *oidcMiddleware*: [redux middleware](http://redux.js.org/docs/advanced/Middleware.html) to automatically check whether or not the current user is signed in & trigger the authentication flow,
- *CallbackComponent*: A react component processing the 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

### Integration with [redux-auth-wrapper](https://github.com/mjrussell/redux-auth-wrapper)
This library is compatible with redux-auth-wrapper. To see an example of how to integrate it look at [jbellmore31g's fork of the sample app](https://github.com/jbellmore31g/redux-oidc-example).

### Version 1
This is the page for version 2 of this package. For version 1 check out the [v1 branch](https://github.com/maxmantz/redux-oidc/tree/v1).

### Documentation

Check out the [wiki](https://github.com/maxmantz/redux-oidc/wiki) for further information.
<commit_msg>code cleanup<commit_after># 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.

### Installation
`npm install --save redux-oidc`

#### Peer dependencies (Version 3)
This package has [oidc-client-js](https://github.com/IdentityModel/oidc-client-js) as its peer dependency.
In order to install this run:

`npm install --save oidc-client`

There is also a dependency on [co](https://www.npmjs.com/package/co).
`npm install --save co`

In addition there is a peer dependency for [immutable.js](https://facebook.github.io/immutable-js/), if you want to use it.

### 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).

It uses the oidc-client-js library to manage OpenID Connect functionality.

It contains the following parts:
- *oidcMiddleware*: [redux middleware](http://redux.js.org/docs/advanced/Middleware.html) to automatically check whether or not the current user is signed in & trigger the authentication flow,
- *CallbackComponent*: A react component processing the 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

### Version 3 under development
I've decided to overhaul the API of this library. The main changes include:
- better SSR & React-Native support due to not relying on `window` anymore,
- removed `childContext` from the `<OidcProvider />`, user manager now must be passed in as a prop,
- immutablejs is now an optional dependency and doesn't need to be installed for those not using it,
- dropped support for `shouldValidate` - the middleware now always validates the user,
- dropped support for `triggerAuthFlow` - this must now be initiated by a custom action (see example app),
- cleaner API all around

The example app is already updated to reflect these changes. I will update the wiki soon...

### Documentation

Check out the [wiki](https://github.com/maxmantz/redux-oidc/wiki) for further information (for Version 2).

{'fraction_non_alphanumeric': 0.10715893741557857, 'fraction_numerical': 0.0036019810895992796, 'mean_word_length': 4.688860435339309, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 14, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7330982', 'n_tokens_mistral': 1308, 'n_tokens_neox': 1279, 'n_words': 478}