Skip to content

Commit

Permalink
Logout fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Facinorous-420 committed Jul 15, 2022
1 parent aafe319 commit b15442a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/routes/route.auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@ export const authRoutes = (app: Router) => {
// When logout, redirect to client
app.get("/auth/logout", (req: Request, res: Response) => {
const user = req.user
req.logout()
req.logout({ keepSessionInfo: false }, null)
req.flash('success_alert_message', 'You have been succesfully logged out')
return res.redirect("/login")
})



// Auth with local passport, send them to ricky boy to prevent brute forcing 'cause Im too lazy to add proper captcha rn
app.post(
"/auth/login",
Expand Down

0 comments on commit b15442a

Please sign in to comment.