Open aseem2625 opened 7 years ago
You may need an else after if (! isLoggedIn).
Other than that
You may be dispatching some actions which alter the authentication state in home page.
Hi @VSuryaBhargava In my case, if a user is logged in then user Details will be available in every case. And I think, that it's not just in my case but in mostly other cases also.
Also, authentication state in homepage has nothing to do with authentication to particular route. I don't want a person to keep logged in, send him to homepage and he can access other pages. Only that particular route he can't access!
So, as in the boilerplate..
So, when I
replace()
, and if the if condition!user.isSpecial
fails, then it goes to the usual called route, access the user details that were fetched as in above code and also, I can easily calllogout
dispatcher I wrote whenever user wants to exit. But when if condition is passed, it replaces to/home
page and opens(redirects) to home page successfully. But I can no longer have user details inauthorization
store. Neither I can calllogout
dispatcher.How to achieve this?