Cypress · Senior · Question 69 of 76
How do you check that sensitive data isn't stored in localStorage?
- 1Check the server logs for the data
- 2Inspect
localStorageafter login and assert absence - 3Assume the framework always handles it correctly
Show the answer
Correct answer: Inspect localStorage after login and assert absence
Explanation
Tokens or personal data in localStorage are exposed to XSS. A quick assertion guards against regressions.