Hi All,
I am trying to implement sessions expiry part in my userLogin Data. After login, req.session is looking like..
{ cookie:
{ path: '/',
_expires: null,
originalMaxAge: null,
httpOnly: true },
passport: { user: '55f651370c0e9d1c0da51400' },
authenticated: true }
Config is something like :
session: {
secret: '757019661f534ea699ffefe7107e2654',
adapter: 'mongo',
host: 'localhost',
port: 27017,
db: 'productiondb',
collection: 'sessions',
cookie: {
maxAge: 15_60_1000
}
}
After login we are assigning req.session.authenticated = true, manually, But now , my intension is too check at controller level for sessions using passport default methods like
req.isAuthenticated() is giving false.
Where i am missing can anyone guide me. to solve and go farward with this module ASAP, it is a roadblock for my development.
Hi All, I am trying to implement sessions expiry part in my userLogin Data. After login, req.session is looking like.. { cookie: { path: '/', _expires: null, originalMaxAge: null, httpOnly: true }, passport: { user: '55f651370c0e9d1c0da51400' }, authenticated: true }
Config is something like : session: { secret: '757019661f534ea699ffefe7107e2654', adapter: 'mongo', host: 'localhost', port: 27017, db: 'productiondb', collection: 'sessions', cookie: { maxAge: 15_60_1000 } } After login we are assigning req.session.authenticated = true, manually, But now , my intension is too check at controller level for sessions using passport default methods like req.isAuthenticated() is giving false.
Where i am missing can anyone guide me. to solve and go farward with this module ASAP, it is a roadblock for my development.