Skip to content

Commit 2edf9c9

Browse files
hcyuserjackycute
andauthored
Update lib/auth/index.js
Co-authored-by: Max Wu <jackymaxj@gmail.com>
1 parent c6ea746 commit 2edf9c9

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

lib/auth/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ authRouter.get('/logout', function (req, res) {
5353
if (config.debug && req.isAuthenticated()) {
5454
logger.debug('user logout: ' + req.user.id)
5555
}
56-
req.logout(()=>{
57-
logger.debug('Please implement logout callback here.')
56+
req.logout((err) => {
57+
if (err) { return next(err) }
58+
res.redirect(config.serverURL + '/')
5859
})
5960
res.redirect(config.serverURL + '/')
6061
})

0 commit comments

Comments
 (0)