Updated login

This commit is contained in:
2025-10-03 11:41:30 +02:00
parent e4c038c940
commit 91cdc9e08a
5 changed files with 39 additions and 2 deletions

View File

@@ -10,7 +10,6 @@ export function initAuth(app, db) {
}
async function checkSessionToken(req, res, next) {
if (req.path.startsWith("/auth/")) {
next();
return;
@@ -52,7 +51,8 @@ async function loginUser(req, res) {
expires.setDate(expires.getDate() + 1);
res.cookie('jeopardytoken', sessiontoken, {
maxAge: 1e3 * 60 * 60 * 24
maxAge: 1e3 * 60 * 60 * 24,
path: "/"
})
res.status(200).send(username);