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 bug has not already been reported
Fastify version
4.24.0
Plugin version
10.6.0
Node.js version
20
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
Manjaro 22
Description
When I use in typescript:
fastify.register(cors,{credentials: true,origin: true}).register(fastifyCookie).register(fastifySession,{secret: 'a secret with minimum length of 32 characters',cookie: {secure: 'auto'}})
Will build failed:
TS2769: No overload matches this call.
Overload 1 of 3, '(plugin: FastifyPluginCallback<FastifySessionOptions, RawServerDefault, FastifyTypeProviderDefault>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error.
Type 'string' is not assignable to type 'boolean | undefined'.
Overload 2 of 3, '(plugin: FastifyPluginAsync<FastifySessionOptions, RawServerDefault, FastifyTypeProviderDefault>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error.
Argument of type 'FastifySession' is not assignable to parameter of type 'FastifyPluginAsync<FastifySessionOptions, RawServerDefault, FastifyTypeProviderDefault>'.
Overload 3 of 3, '(plugin: FastifyPluginCallback<FastifySessionOptions, RawServerDefault, FastifyTypeProviderDefault> | FastifyPluginAsync<...> | Promise<...> | Promise<...>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error.
Type 'string' is not assignable to type 'boolean | undefined'.
Steps to Reproduce
See above
Expected Behavior
secure - The boolean value of the Secure attribute. Set this option to false when communicating over an unencrypted (HTTP) connection. Value can be set to auto; in this case, the Secure attribute will be set to false for an HTTP request. In the case of HTTPS, it will be set to true. Defaults to true.
The text was updated successfully, but these errors were encountered:
Prerequisites
Fastify version
4.24.0
Plugin version
10.6.0
Node.js version
20
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
Manjaro 22
Description
When I use in typescript:
Will build failed:
Steps to Reproduce
See above
Expected Behavior
secure - The boolean value of the Secure attribute. Set this option to false when communicating over an unencrypted (HTTP) connection. Value can be set to auto; in this case, the Secure attribute will be set to false for an HTTP request. In the case of HTTPS, it will be set to true. Defaults to true.
The text was updated successfully, but these errors were encountered: