I would like to store some sensitive information in sessionStorage to use it across multiple pages.
However anyone with a minimal Javascript knowledge can open browser’s JavaScript console, type sessionStorage with dot at the end and see all its fields and subsequently all fields’ content.
So actually sessionStorage is absolutely not safe, meaning I cannot store there any sensitive information like user ID, password, etc.
Or am I missing something?
Safe in what context? It’s storage for client data, so as long as the data doesn’t leak between websites you’re good to go. Of course sessionStorage wasn’t designed to keep any data you want to hide from your user (especially sensitive information!) so don’t be surprised that any data you put there is easily available to him.
Use other means to store such sensitive information (preferably server side storage where it’s presumably more safe).