From 3cb44e8dc8ec695f9996888a74fa0165343f2091 Mon Sep 17 00:00:00 2001 From: Chamika J <75464293+chamikaJ@users.noreply.github.com> Date: Wed, 6 Aug 2025 10:48:52 +0530 Subject: [PATCH] fix(auth): correct type assertion for session passport property - Updated the session passport assignment to use a type assertion for better TypeScript compatibility. - This change ensures that the session object is correctly recognized, improving type safety in the authentication process. --- worklenz-backend/src/controllers/auth-controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worklenz-backend/src/controllers/auth-controller.ts b/worklenz-backend/src/controllers/auth-controller.ts index b5c8759c..ef8c069a 100644 --- a/worklenz-backend/src/controllers/auth-controller.ts +++ b/worklenz-backend/src/controllers/auth-controller.ts @@ -259,7 +259,7 @@ export default class AuthController extends WorklenzControllerBase { console.log("Session regenerated from:", oldSessionId, "to:", req.sessionID); // Re-establish the user in the new session - req.session.passport = { user: { id: user.id } }; + (req.session as any).passport = { user: { id: user.id } }; console.log("=== LOGIN SUCCESSFUL ==="); console.log("Session ID after login:", req.sessionID);