I use cosmos db for sesseion store in node.js. And cosmos db version is 3.6 .
I execute follwing code.
const expressSession = require("express-session");
const MongoStore = require("connect-mongo")(expressSession);
const store = new MongoStore({
mongooseConnection: mongoose.connection,
ttl:24 * 60 * 60 * 1000,
})
As result,following message is shown.
(node:16068) UnhandledPromiseRejectionWarning: MongoError: The 'expireAfterSeconds' option is supported on '_ts' field only.
What is solution for this problem?