My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

How to store different session in passport local

Lem's photo
Lem
·Mar 4, 2018

I have two type of users a normalUser and an adminUser. How can I store their sessions on a different variable so that i can use them on my template engine for viewing specifically for if else blocks. Normally its stored like. req.user is it possible to have a req.admin?

Im using express-handlebars, passport-local.