Type 'RedisStore' is not assignable to type 'SessionStore<Session>'.
const authConfig: ConfigParams = {
(...)
session: {
(...)
store: new RedisStore({
client: new Redis({...})
}
}
Type 'RedisStore' is not assignable to type 'SessionStore<Session>'.
Types of property 'set' are incompatible.
Type '(sid: string, sess: SessionData, cb?: ((_err?: unknown, _data?: any) => void) | undefined) => Promise<void>' is not assignable to type '(sid: string, session: SessionStorePayload<Session>, callback?: ((err?: any) => void) | undefined) => void'.
Types of parameters 'sess' and 'session' are incompatible.
Type 'SessionStorePayload<Session>' is not assignable to type 'SessionData'.
Types of property 'cookie' are incompatible.
Property 'originalMaxAge' is missing in type '{ expires: number; maxAge: number; }' but required in type 'Cookie'.ts(2322)
index.d.ts(325, 9): 'originalMaxAge' is declared here.
Checklist
Description
Getting the following error when trying to assign
ConfigParams.session.store:Reproduction
Just try to assign the
RedisStoretostore:Additional context
Whole message error:
express-openid-connect version
2.18.0
Express version
4.21.2
Node.js version
20.18.0