'Why is passportjs not resetting my cookie
I'm using passport username and password logic to authenticate my users. Whenever I call this route, it's not removing the cookies from the browser
router.post('/logout', function(req, res, next) {
req.logout();
});
I'm trying to remove the cookie that I store here.
app.use(
session({
secret: "mysecret",
resave: false,
saveUninitialized: false,
store: MongoStore.create({
mongoUrl: process.env.MONGO_URI,
collectionName: "sessions",
}),
cookie: {
maxAge: 1000 * 60 * 60 * 24,
},
})
);
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
