Thank you very much. I worked on it for 3 days and your solution saved me.
static create(res: Response, data: object) {
const token = JsonWebToken.sign(data);
res.cookie("your_cookie", token, {
maxAge: 604800 * 1000,
httpOnly: true,
sameSite: "none",
secure: true,
domain: ".web.com
});
}
}