Thank you for this great summary. There is one thing that tripped me up whilst creating an application that was embedded inside another site within an iFrame. If a user disables Third Party Cookies, then the Web Storage API is not accessible. Even though it's not a cookie, and that the parent site cannot access the cookies inside of an iframe, it's still blocked.
However, please note that sensitive, private data like JWTs should be handled with care and not stored in Web Storage because it can be accessible by anyone.
There isn't anything wrong in storing jwt/jwe in localStorage.
Victor Vedenin
Hey! Thanks for the article! There are little typos in examples - you trying to access to global variables with uppercased window object. It won't work. You should use
window.localStorageor justlocalStorage