Skip to content

Commit

Permalink
lets give a try
Browse files Browse the repository at this point in the history
  • Loading branch information
fcrezza committed Jul 24, 2020
1 parent b137486 commit 90e918b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/api/controller/common.js
Expand Up @@ -140,6 +140,7 @@ function logout(req, res, next) {

function fetchUser(req, res) {
if (req.isAuthenticated()) {
console.log(isAuthenticated())
return res.json(req.user)
}

Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Expand Up @@ -36,11 +36,11 @@ const session = expressSession({
resave: false,
saveUninitialized: false,
cookie: {
sameSite: 'none',
secure: process.env.NODE_ENV === 'production',
maxAge: 30 * 24 * 60 * 60 * 1000,
},
})
// sameSite: 'none',
// secure: process.env.NODE_ENV === 'production',

passport.use(
'professorLogin',
Expand Down

0 comments on commit 90e918b

Please sign in to comment.