PassportJS - How to make a separate passport.

My question is about PassportJS - using multiple folders in an Express application . Therefore, while I already have two separate passport instances, I realized that they both have the same cookie created here:

application.use(session({ secret: 'my secret cookie', key: 'usid' })); 

I can add another cookie with a different name using this:

 app.use(connect.session({ secret: 'keyboard cat', key: 'rsid' })) 

However, I don’t understand how to instruct each passport to use its own cookie.

+5
source share

Source: https://habr.com/ru/post/1202801/


All Articles