The right way to implement authentication using cookies, according to you.

jochemstoel

Jochem Stoel

Posted on May 20, 2018

The right way to implement authentication using cookies, according to you.

The internet is full of opinions when it comes to implementing authentication and the use of sessions/cookies. We all agree that storing passwords in cookies or setting a value like admin = true is a very bad idea. We also have to deal with the prevention of XSS cookie stealing. (appending document.cookie to an <IMG> element src attribute or whatever)
In many cases we also want to prevent that a 'saved' cookie will successfully authenticate a different client or device when copied.

In your experience, what is the right way to handle authentication? In PHP, JavaScript or whatever language / framework you happen to prefer?

💖 💪 🙅 🚩
jochemstoel
Jochem Stoel

Posted on May 20, 2018

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

What was your win this week?
weeklyretro What was your win this week?

November 29, 2024

S3 native state locking in Terraform
undefined S3 native state locking in Terraform

November 29, 2024

Discuss moment
undefined Discuss moment

November 29, 2024