(I don't know a lot about web development)
I have a web page with passport login and express session.
Everything works but the cookie and I noticed what was the problem ( if i define the path of the cookie, the cookie doesn't add to the domain. )
If anyone knows why it happens please tell me.
(session store: connect-mongo 4.6.0)
app.use(session({ secret: 'secret', store: Store.create({ mongoUrl: 'myMongoURL', dbName: 'db-sessions' }), cookie: { path: '/menu', domain: 'mydomain.com', maxAge: 60000 * 60 * 24, }, resave: false, saveUninitialized: false,
}))
Aucun commentaire:
Enregistrer un commentaire