|
|
|
|
|
by jakelazaroff
2730 days ago
|
|
You're describing CSRF, but again: this vulnerability doesn't exist in the scenario I'm describing. If you don't set HttpOnly on your cookies and ignore the cookie header on your backend (i.e. only use cookies for storage, not for transport), cookies are strictly better than local storage, since the only difference between the two is now local storage's lax access policy. The scenario you're describing can also be solved by using a CSRF token retrieved from the backend. Meanwhile, there is literally no way to secure secrets kept in local storage from third party scripts. |
|
I don't believe a situation exists where using cookies for client-side storage is more secure than local storage. Could you please explain this in more detail?