Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not really validate, just maintain state. (probably should have worded that better...)

Of course the server is going to validate it every request, but it's nicer being able to fail "sooner" on the client side when we know we aren't signed in, or we have never signed in, or our token expired a day ago and we need to re-login, etc...

With HTTPOnly cookies we need to make a request to find any of that out, and when paired with redux and react it's very annoying to have to make a web request to get a small glimpse into what the state really is and try and maintain that in a JS value somewhere AND avoid flashes of incorrect state.

Hell with HTTPOnly cookies you can't even clear it without a web request!



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: