Syntax - Tasty Web Development Treats cover image

Hasty Treat - Authentication: LocalStorage vs Cookies vs Sessions vs Tokens

Syntax - Tasty Web Development Treats

00:00

How Do I Track a User?

With local storage, you need to grab the tokens ed along for every request. With with cookies, that is sent along on every single, ever single request. Tokens are more explicit, although in almost all use cases you're goig to have something like apollo middlewear. The last thing i want to note here is just security issues. There's lots of debate on either side. Should you use tokens, or should you use sessions? What's the better approach?

Play episode from 09:37
Transcript

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app