I'm currently making a web app with node/express.js for the API and Vue.js for the front-end.
For the authentication, I set a JWT and send the value via a cookie (HttpOnly). The "SetCookie" is in the response request in Chrome/Firefox debugger but apparently it is not stored anywhere ! When I try to make requests which need the cookie, the requests headers don't contain any cookie. I really don't understand why :/. After some researches, I thought it was because I was working on localhost, so I moved my server on the cloud and set a false domain for the front by modifying the hosts file, but it still doesn't work.
here an example of response request : Response header
Set the cookie on server:
res.cookie('token', token, { path: '/', domain: '.shareinfo.io', httpOnly: true, maxAge: 86400000 // 24h }); If someone has an idea or a solution, it would be very nice !
Thank you, regards,
Alvyre