DEV Community

Discussion on: Setting Up Sessions with NestJS, Passport, and Redis

Collapse
 
grostmaster profile image
Oleh Butsyk

How can I correctly make logout from the session?

Collapse
 
wguerram profile image
wguerram

Try
req.logout():
req.session.destroy();

Collapse
 
jmcdo29 profile image
Jay McDoniel

I believe that just req.logout() should do it , as passport should help in maintaining the session information under the hood