Relative Content

Tag Archive for node.jsvue.js

Vue js cookies are not stored

If I use the cookies via node js
const user_token = jwt.sign(user, process.env.SRC_PASSWORD, { expiresIn: “1h” });
res.cookie(“token”, user_token, {
httpOnly: true,
secure: false, // Set this to true if using HTTPS
sameSite: ‘lax’
});
to the user, they are not saved, but if I try to save the cookies directly on a side of the server it works, but that doesn’t help me much because in this use case the server is an API.