Web Security · Junior · Question 49 of 75
Which data should never be stored in localStorage?
- ✓Correct answer: Passwords, long-lived tokens and other secrets
- 2The user's preferred theme
- 3Which onboarding hints the user has closed
Explanation
localStorage is plain text, persistent and readable by any script on the origin. It's fine for preferences, not for secrets.