2.0.0 • Published 4 years ago
@adamldoyle/react-aws-auth-redux-slice v2.0.0
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
buildAuthSlicewhich returnsauthSlice,authSelectors,AuthInjector - Nest
AuthInjectorwithinAuthContextProvider(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
authSelectorsto select session/profile information as necessary
Examples
OR
- Create
.envfile in root based on.env.sample yarn storybook
Development
yarn installyarn build
Contributors
License
MIT