@adamldoyle/react-aws-auth-redux-slice
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

react-aws-auth-redux-slice

Extension of @adamldoyle/react-aws-auth-context-core that listens to Auth context changes and adds the session and profile to an authentication Redux slice.

Features

  1. Automatically detects profile/session changes and keeps them up-to-date in Redux
  2. Provides several selectors to extract information

Installation

  1. yarn add @adamldoyle/react-aws-auth-redux-slice
  2. Build auth slice using buildAuthSlice which returns authSlice, authSelectors, AuthInjector
  3. Nest AuthInjector within AuthContextProvider (from @adamldoyle/react-aws-auth-context-core or a related component library) and containing the rest of your application component heirarchy
  4. Use selectors provided by authSelectors to select session/profile information as necessary

Examples

OR

  1. Create .env file in root based on .env.sample
  2. yarn storybook

Development

  1. yarn install
  2. yarn build

Contributors

Adam Doyle

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @adamldoyle/react-aws-auth-redux-slice

Weekly Downloads

4

Version

2.0.0

License

MIT

Unpacked Size

42.4 kB

Total Files

9

Last publish

Collaborators

  • adamldoyle