trying another fix for login
This commit is contained in:
parent
9cf80552e3
commit
d0c6705c0b
2 changed files with 1 additions and 4 deletions
|
@ -25,9 +25,6 @@ app.use(
|
|||
secret: secret.session,
|
||||
resave: true,
|
||||
saveUninitialized: false,
|
||||
cookie: {
|
||||
httpOnly: false,
|
||||
},
|
||||
})
|
||||
)
|
||||
app.use(passport.initialize())
|
||||
|
|
|
@ -7,7 +7,7 @@ import { Express, Request, Response, NextFunction } from "express"
|
|||
import config from "../config.json"
|
||||
|
||||
const checkIfLoggedIn = (req: Request, res: Response, next: NextFunction) => {
|
||||
if (req.isAuthenticated() && req.user) return next()
|
||||
if (req.isAuthenticated()) return next()
|
||||
res.status(401).send()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue