At the moment I have a site with a few paths. There are the parent paths User, Admin and Login. User and Admin has a few child paths. To authorize a login, I send a request to my api which returns the authenticationLevel (1 for user or 2 for admin). Then I save this in sessionstorage as authlevel and logged in "true". For each path, I check if the person is logged in and which authlevel it has.
Now my question is, can the sessionstorage be edited by anyone (set loggedin to true and authlevel)? This would make it possible for anyone to view the pages which is a problem. How can I solve this otherwise? I've thought about making a request to the api for every path change but im not sure its a good solution.