By implementing role-based authentication in Vue app, we can efficiently manage routes and components visibility between regular users and administrators.
As the number of roles increases, the application size grows, making it challenging to control CRUD operations effectively.
I am exploring a secure model setup where user/admin content is not served to the browser until authentication is verified. This includes ensuring that JavaScript scripts are not loaded.
My suggestion involves using a simple HTML page with redirection to a separate application containing a JWT token with user details for enhanced security.
Is this approach viable or is there a more efficient way to accomplish this in Vue? Should Express be integrated to load server contents post-login?
I am seeking an example or reference material on building a secure application.
Furthermore, I am interested in methods to clear the browser cache after logging out or when the token expires.