You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched existing issues to ensure the issue has not already been raised
Issue
Not actually a bug, just a missing userInfo typing for generateCsrf decorator function. Now function parameters accept only fastifyCsrfProtection.CookieSerializeOptions, but userInfo should also be possible to pass
The text was updated successfully, but these errors were encountered:
I did not investigate now if this is a valid claim. But if you are willing to provide a PR with tests and typings, I can promise you that we can evaluate it and merge it in a timely manner.
I confirm that this is true. The typing is indeed missing or broken. When I pass the userInfo to the reply.generateCsrf({ userInfo } as unknown as CookieSerializeOptions), the plugin works as expected. In the documentation, it is mentioned to pass the userInfo argument in a specific case. While fixing the typing, might as well add an example to the documentation to be more clear.
Prerequisites
Issue
Not actually a bug, just a missing
userInfo
typing forgenerateCsrf
decorator function. Now function parameters accept only fastifyCsrfProtection.CookieSerializeOptions, but userInfo should also be possible to passThe text was updated successfully, but these errors were encountered: