I am setting cookie here
res.cookie('token', token, {
httpOnly: false, / tried this true as well
secure:true,
sameSite: "Strict"
});
My cors
app.use(cors({
origin: "https://link-bee-roan.vercel.app",
credentials: true
}));
In the frontEnd
axios.defaults.withCredentials = true;
.
.
.
let response = await axios.post("https://linkbee-2.onrender.com/login", {
// let response = await axios.post("http://localhost:3000/login", {
userID, password
},{
withCredentials: true,
});
I can see the cookie token in the console
But as soon as the page is refreshed the token is gone, please help me with this problem