DEV Community

Discussion on: What is really the difference between Cookie, Session and Tokens that nobody is talking about ?.

Collapse
 
dev_emmy profile image
nshimiye_emmy

Yeah, I think that's the reason as to why cookie-based authentication is not that much used nowadays. Most applications use token based authentication

Collapse
 
andreidascalu profile image
Andrei Dascalu

Not sure that's the real alternative. Sessions need to be stored somewhere server side (while tokens don't) but token are also stored in cookies (just not sent via cookies)
Client side it's the same type of problem. You need to store the session Id or the token somewhere on the client before it's sent back to server, preferably in a way that's protected against xss and csrf.

Thread Thread
 
dev_emmy profile image
nshimiye_emmy

yeah sure.