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:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user