Grokking the Modern Frontend System Design Interview
Vote

0% completed

​

Authentication Tokens in the Browser

Basket keeps a shopper signed in with a session cookie marked HttpOnly, Secure and SameSite=Lax. Here is what that cookie promises:

  • Script running in the page cannot read the cookie's value, so injected code cannot copy it to another server.
  • The cookie travels only over HTTPS.
  • Most requests started by other sites, such as a form posted from a stranger's page, arrive without it.

And here is what it does not promise:

  • It does not stop injected script from sending requests from Basket's own page, which carry the cookie automatically.

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content