2

I have the same problem that these questions but in NodeJS:

If I write domain.com is a different session that www.domain.com ... Why?

It's for some domain rule?

I share here my cookie in express:

app.use(session({
    saveUninitialized: true,
    resave: true,
    secret: config.sessionSecret,
    cookie: {
        maxAge: 15778476000,
        httpOnly: true,
        secure: false 
    },
    key: 'sessionId',
    store: new mongoStore({
        db: db.connection.db,
        collection: config.sessionCollection
    })
}));

Thank you!

Community
  • 1
  • 1
Aral Roca
  • 5,442
  • 8
  • 47
  • 78

0 Answers0