Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
660 views
in Technique[技术] by (71.8m points)

node.js - 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

question from:https://stackoverflow.com/questions/65878536/passports-req-logout-doesnt-work-when-working-with-angular-any-solution

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...