Open aseem2625 opened 8 years ago
Hi, thanks for raising this issue! To be honest I didn't try it in the isomorphic app yet... I will test it and fix the issue if needed.
Thanks @burczu I am eager to know its working with isomorphic react app.
On a side note: Also, I liked your article at http://frontendinsights.com/role-based-authorization-using-react-router/ Conceptually is good. As a feedback, I think it can be improved if the context of the project setup is given. For eg: We've several ways of setting up Routes.js and other things in React. 😃
Hi @burczu Have you managed to make it work on isomorphic app ?
I was trying to figure out a way but it doesn't seem to work for me if I try to put this on server side.
I am using this boilerplate. https://github.com/erikras/react-redux-universal-hot-example/
In
server.js
, I addedAnd in same file, I replaced
For starting, I modified
routes.js
asand Rest I've made RoleAwareComponent.js and AuthorizedComponent.js and
RouterHandler.js
as mentioned in the article http://frontendinsights.com/role-based-authorization-using-react-router/These things doesn't seem to work.
Can you please direct me if this is the correct way to add Role Based Authorization on server side? I can give further info if needed.
Thanks