I'm facing a security concern with my Angular application. Currently, I store user details like isAdmin, isLoggedIn, email, and more in local storage. However, I'm worried about the risks of unauthorized updates to this data, especially since my app's authorization relies on isAdmin.
The Issue: How can I securely store user information in Angular to prevent unauthorized access and manipulation, taking into account sensitive data like isAdmin?
My Attempt with JWT Token: I've looked into using JWT tokens, but I have doubts about their security. If a token lands on a JWT decoding website, all the data is exposed. Is there a better way to handle JWT tokens in my app for enhanced security?
My Attempt with NgRx: I've experimented with NgRx for state management, but faced an issue where the state doesn't persist after a browser refresh. How can I ensure that crucial user authentication data remains intact even after a page reload?
Any advice or best practices to tackle these concerns and enhance the security of my Angular app would be highly appreciated. Thank you in advance for your help!