I feel like this is a better solution than 238 since it doesn't degrade security by silently not signing a cookie
Also, if fastify-cookie is manually registered before secure-session (in which case the user MUST pass a secret if they expect to sign their cookies afterward), it still throws indicating an incorrect usage
Fixes https://github.com/fastify/fastify-cookie/issues/227
I feel like this is a better solution than 238 since it doesn't degrade security by silently not signing a cookie
Also, if fastify-cookie is manually registered before secure-session (in which case the user MUST pass a secret if they expect to sign their cookies afterward), it still throws indicating an incorrect usage
Checklist
npm run test
andnpm run benchmark