-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
connect-redis no longer compatible with @fastify/session #224
Comments
Everything is functioning properly. I simply duplicated the contents of examples/redis.js into a new file named /server.js and included the following package.json:
|
Hm, that's weird, it doesn't make sense since the library is indeed requesting Before I was trying over NestJs so I tried again following your steps and I'm still getting the same issue as you can see here For me it makes total sense since I didn't install the library and |
In case someone is experiencing the same issue, I've forked the original |
I think it would be likely worthwhile to contribute |
At a glance, https://github.com/mgcrea/fastify-session-redis-store/blob/master/src/RedisStore.ts looks like it is better implemented. |
Could not get @fastify/session to work despite trying for ours. Things like destroying session do not work. TypeScript types are confusing. It is possible that this was an issue with the fastify-session-redis-store not working. Switched to https://github.com/mgcrea/fastify-session and it worked from first try. @mcollina maybe deprecate in favor of https://github.com/mgcrea/fastify-session? Seems like a nice ecosystem that's well documented and tested. |
Prerequisites
Fastify version
4.24.3
Plugin version
10.6.0
Node.js version
18.17.0
Operating system
macOS
Operating system version (i.e. 20.04, 11.3, 10)
14.0
Description
Trying to make this plugin work with the latest version of
connect-redis
will fail sinceexpress-session
is a peer dependency of it since version7.0.0
. RedisStore is extendingStore
fromexpress-session
and also using theSessionData
type from it as you can see here: https://github.com/tj/connect-redis/blob/master/index.tsThis leads to the following issue when trying to run a project without
express-session
installed:This can be fixed by downgrading the
connect-redis
version tov6.1.3
Steps to Reproduce
connect-redis
Expected Behavior
No response
The text was updated successfully, but these errors were encountered: