-
Notifications
You must be signed in to change notification settings - Fork 19
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
Bug with sessionPlugin in NestJS with Fastify #135
Comments
To be clear, this isn't related to NestJS directly. Only to the Typescript types. A minimum reproduction repository without NestJS can be found in my comment here |
Types is correct. Only document need to be updated. |
@climba03003 what's the fix? The example looks good to me. |
Lines 46 to 48 in 0b04635
Edit: Missing the |
Sure enough, it's kind of hidden in this line as well: csrf-protection/types/index.d.ts Line 40 in 0b04635
I can confirm that adding |
Would you like to send a Pull Request to address this issue? Remember to add unit tests. |
any update on this ? |
Prerequisites
Fastify version
4.17.0
Plugin version
6.3.0
Node.js version
20.0.0
Operating system
Windows
Operating system version (i.e. 20.04, 11.3, 10)
10
Description
The documentation says:
And when in NestJS 9.4.0 it declares csrf-protection in accordance with the documentation, code below in section "Steps to Reproduce".
Error:
Even adding
session Plugin
and setting the value to'@fastify/cookie'
gives an error and giving the valueundefined
shows that 1 of 3 types must be selected, e.g.@fastify/cookie
or@fastify/session
. So if it wasn't for the help on Stack, I would still think that I'm doing something wrong and here it turns out that it's a bug in your version, so I was forced to use version 6.2.0 and I would prefer the latest one.If you need the code of my application, I will add it to the repo so that you can check for yourself that this bug exists :)
Steps to Reproduce
Expected Behavior
I expected it to work according to the documentation and as it should after initialization
The text was updated successfully, but these errors were encountered: