DEV Community

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

Collapse
 
rantiev profile image
rantiev

Hi, What for you need redis? If you do request user from DB on every request in passport validate? You have your token as a cookie or localstorage item, you use it to get user from DB on every request? What is the reason to have session then.

Ig you fetch user once after login, then you could reuse this info from session. Otherwise what for?