1
0
Fork 0

trying another fix for login

This commit is contained in:
Kim, Jimin 2021-09-12 21:59:48 +09:00
parent 9cf80552e3
commit d0c6705c0b
2 changed files with 1 additions and 4 deletions

View file

@ -25,9 +25,6 @@ app.use(
secret: secret.session, secret: secret.session,
resave: true, resave: true,
saveUninitialized: false, saveUninitialized: false,
cookie: {
httpOnly: false,
},
}) })
) )
app.use(passport.initialize()) app.use(passport.initialize())

View file

@ -7,7 +7,7 @@ import { Express, Request, Response, NextFunction } from "express"
import config from "../config.json" import config from "../config.json"
const checkIfLoggedIn = (req: Request, res: Response, next: NextFunction) => { const checkIfLoggedIn = (req: Request, res: Response, next: NextFunction) => {
if (req.isAuthenticated() && req.user) return next() if (req.isAuthenticated()) return next()
res.status(401).send() res.status(401).send()
} }