Session key not stored in Redis
Hi everyone,
I am combining NestJS + passport with oidc strategy + express-session + connect-redis but for some reason the session data is not stored in Redis. The whole flow does work yet no session data is being stored in Redis.
express-session is setup like this:
```
session({
store: new RedisStore({
client: this.redis,
}),
secret: this.configService.get<SessionConfiguration>('session').key,
saveUninitialized: false,
resave: false,
rolling: true,
proxy: true,
cookie: {
httpOnly: true,
maxAge: 1000 * 60 * 60 * 24, // Session expiration time (e.g., 1 day)
},
})
```
Feels that the session is either automatically deleted at the end of the OIDC flow but I am not 100% sure about this. Hopefully you can help me out. Also I am using "redis": "^4.2.0" and "connect-redis": "^7.1.1".
EDIT: cookies are also set with key **connect.sid** and filled with the session id.
EDIT 2: this passport strategy is being used: https://www.passportjs.org/packages/passport-openidconnect/
Thanks in advance!
关闭于 2024-08-30 1 条评论