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.
This commit is contained in:
Chamika J
2025-08-06 10:48:52 +05:30
parent 11a31e5a6d
commit 3cb44e8dc8

View File

@@ -259,7 +259,7 @@ export default class AuthController extends WorklenzControllerBase {
console.log("Session regenerated from:", oldSessionId, "to:", req.sessionID); console.log("Session regenerated from:", oldSessionId, "to:", req.sessionID);
// Re-establish the user in the new session // 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("=== LOGIN SUCCESSFUL ===");
console.log("Session ID after login:", req.sessionID); console.log("Session ID after login:", req.sessionID);