Saturday, 22 August 2020

Are cookies sent in a request by default?

I thought I'd have to manually parse a cookie and sent it in a request body (or header) from my React.js app to my Express.js API. But this tutorial says all cookies are sent to the server by default:Validate the JWT from the CookieNow that the JWT is in a cookie, it will automatically be sent to the API in any calls we make to it. This is how the browser behaves by default.https://medium.com/@ryanchenkie_40935/react-authentication-how-to-store-jwt-in-a-cookie-346519310e81Is this actually true? The only setting I plan to set is httpOnly to true.

Submitted August 22, 2020 at 03:54PM by javascript_dev

No comments:

Post a Comment