From b15442a49bc49530bee4b2cb7532ba5f9c13f4a5 Mon Sep 17 00:00:00 2001 From: Facinorous-420 Date: Fri, 15 Jul 2022 12:47:16 -0400 Subject: [PATCH] Logout fix --- src/routes/route.auth.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/routes/route.auth.ts b/src/routes/route.auth.ts index 81edbc2..26350cd 100644 --- a/src/routes/route.auth.ts +++ b/src/routes/route.auth.ts @@ -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",