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
- Automatically detects profile/session changes and keeps them up-to-date in Redux
- Provides several selectors to extract information
Installation
yarn add @adamldoyle/react-aws-auth-redux-slice
- Build auth slice using
buildAuthSlice
which returnsauthSlice
,authSelectors
,AuthInjector
- Nest
AuthInjector
withinAuthContextProvider
(from @adamldoyle/react-aws-auth-context-core or a related component library) and containing the rest of your application component heirarchy - Use selectors provided by
authSelectors
to select session/profile information as necessary
Examples
OR
- Create
.env
file in root based on.env.sample
yarn storybook
Development
yarn install
yarn build
Contributors
License
MIT