Updated login
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user