Skip to content

Commit

Permalink
Update lib/auth/index.js
Browse files Browse the repository at this point in the history
Co-authored-by: Max Wu <jackymaxj@gmail.com>
  • Loading branch information
hcyuser and jackycute authored Aug 10, 2023
1 parent c6ea746 commit 2edf9c9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/auth/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ authRouter.get('/logout', function (req, res) {
if (config.debug && req.isAuthenticated()) {
logger.debug('user logout: ' + req.user.id)
}
req.logout(()=>{
logger.debug('Please implement logout callback here.')
req.logout((err) => {
if (err) { return next(err) }
res.redirect(config.serverURL + '/')
})
res.redirect(config.serverURL + '/')
})

0 comments on commit 2edf9c9

Please sign in to comment.