Decouple your Authentication and Authorization from your components!
npm install --save redux-auth-wrapper
redux-auth-wrapper is a utility library for handling authentication and authorization in react + redux applications.
Read the documentation at https://mjrussell.github.io/redux-auth-wrapper
Version 2.x is a big internal rewrite! It provides a massive increase in flexibility when using redux-auth-wrapper and also introduces some breaking changes. See the Migration Guide for more details if coming from 1.x. Or check out the Getting Started guide if you've never used redux-auth-wrapper before.
Looking for Version 1.x? You can browse the 1.x README here.
Having trouble? First check out the Troubleshooting section of the documentation, and then search the issues, both open and closed for your problem. If you are still having trouble or have a question on using redux-auth-wrapper, please open an issue! You can also ask on the gitter channel.
Other examples not yet updated to v2: