passport’s req.logout () doesn’t work when working with angular any solution?

I am working with angular and nodejs with express-session, express, passport, passport-local libraries, the closing session does not kill it using req.logout () method when browsing other pages the session is still active. I did test on postman if he manages to logout, but then when implementing the interface in angular the session is not deleted

this is the code:

router.get('/logout'(req, res) => {
     req.logout();
     res.json('logout') 
}

Could anyone help me please, I thank you in advance

Source: Angular Questions