I've been thinking about security in my apps, and unfortunately there's a ton of conflicting advice on the Internet about security, so I need to write out my conclusions in one place so I don't have to end up going through the security-googling spiral again every time I need to implement security for my app.
Based on what I've read, security on the web is founded on the idea that the user's webpage could be compromised at any time, and there are certain steps you can take to prevent the user from falling victim to a successful XSS attack. One of these precautions is a cookie.
Based on my understanding, the security of cookies come from the guarantees enforced by the browser: that httpOnly
cookies can't be accessed and changed from JavaScript, thus becoming safe from an XSS attack. In theory, you could create a browser that doesn't obey these rules, but this wouldn't be an issue because nobody (except you) would be using these browsers. This also holds true for other