I am setting cookie like this:
res.status(statusCode).cookie("access_token", token, {httpOnly: true, maxAge: 2 * 60 * 60 * 1000, path: '/', sameSite: 'none', secure: true}
and in server.js had set the CORS functionality like this:
app.use(cors({ credentials: true, origin: true }));
But in the browser I am getting this error:
Indicate whether a cookie is intended to be set in a cross-site context by specifying its SameSite attribute
What I am missing here?