diff options
| author | Bobby <[email protected]> | 2022-06-26 21:20:22 +0530 |
|---|---|---|
| committer | Bobby <[email protected]> | 2022-06-26 21:20:22 +0530 |
| commit | d70a2c9397d25296021871ac088a28054923e970 (patch) | |
| tree | ae7ba1f080bcaec720410fe15427285ad138344c | |
| parent | 5cc36e5144e6e3bba259a837fa06321c547f49d8 (diff) | |
| download | thatcomputerscientist-d70a2c9397d25296021871ac088a28054923e970.tar.xz thatcomputerscientist-d70a2c9397d25296021871ac088a28054923e970.zip | |
fix2: cookie logging out
| -rw-r--r-- | routes/auth.routes.js | 4 | ||||
| -rw-r--r-- | server.js | 1 |
2 files changed, 1 insertions, 4 deletions
diff --git a/routes/auth.routes.js b/routes/auth.routes.js index 9615aa86..d4b40af0 100644 --- a/routes/auth.routes.js +++ b/routes/auth.routes.js @@ -9,9 +9,7 @@ const validationString = process.env.AUTHORIZATION_STRING; const connectionURL = process.env.DATABASE_URL; router.get("/logout", (req, res) => { - res.clearCookie("token", { - domain: require("yaml").parse(require("fs").readFileSync("site.config.yml", "utf8")).domain, - }); + res.clearCookie("token"); res.redirect(req.get("referer")); }); @@ -20,7 +20,6 @@ app.use( expressSession({ cookie: { maxAge: 30 * 24 * 60 * 60 * 1000, - domain: require("yaml").parse(require("fs").readFileSync("site.config.yml", "utf8")).domain, }, secret: process.env.AUTHORIZATION_STRING, resave: true, |
