JWT vs cookies for token-based authentication

I read some posts about “JWT vs Cookie” but they only made me more confused… I want some clarification, when people talking about “token-based authentication vs cookies”, cookies here merely refer to session cookies? My understanding is that cookie is like a medium, it can be used to implement a token-based authentication(store something that can … Read more

Where to store JWT in browser? How to protect against CSRF?

I know cookie-based authentication. SSL and HttpOnly flags can be applied to protect cookie-based authentication from MITM and XSS. However, more special measures will be needed to apply in order to protect it from CSRF. They are just a bit complicated. (reference) Recently, I discover that JSON Web Token (JWT) is quite hot as a … Read more