I am using my building journey to learn web development. I'm using nodejs, reactjs, mongodb, axios and expressjs. Currently, I'm storing basic user details such username, id, role,email in the local storage. I could store other things as I continue. However, along the line, I felt that storing something like role in the localstorage could be problematic since anyone can edit their localstorage. This means, user can easily edit their local storage and change their role to admin to have access to what admin has access to.
I decided to visit some known websites like Upwork, etc, I checked my localstorage and I noticed that they didn't store information such as username, email, role, etc. As someone new in this field, where do you think is best to store information such as the above I mentioned, especially data that can grant access and change access privileges of any user? I don't think localstorage is best for this at all. Also, while inspecting the browser developer tool, I noticed that whatever one passed from the response from backend is also seen under the response section in the web developer tool. Is that response section accessible by Javascript? Or it is already encrypted by expressjs?