Is it safe to put a JWT in a non-HttpOnly cookie if JS needs to read it?
Single-page app, API on a separate subdomain. We need the client to read a claim from the token to decide which UI to render, so the cookie cannot be HttpOnly. It is SameSite=Strict and Secure. How much risk does that actually add, and what is the usual mitigation?
4 replies