From c8d6fcdd0b3abe92f715178d5f4b6c9494758e31 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Sun, 3 Nov 2024 10:58:19 +0000 Subject: [PATCH] style: remove trailing whitespace --- README.md | 6 +++--- types/types.d.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 71f0171..37f66de 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ app.addHook('preHandler', (request, reply, next) => { The session plugin accepts the following options. It decorates the request with the `sessionStore` and a `session` object. The session data is stored server-side using the configured session store. #### options ##### secret (required) -The secret used to sign the cookie. Must be an array of strings or a string with a length of 32 or greater or a custom signer. +The secret used to sign the cookie. Must be an array of strings or a string with a length of 32 or greater or a custom signer. If an array, the first secret is used to sign new cookies and is the first to be checked for incoming cookies. Further secrets in the array are used to check incoming cookies in the order specified. @@ -190,10 +190,10 @@ fastify.decryptSession(sessionId, request, { maxAge: 86400 }, () => { ``` ### Typescript support: -This plugin supports typescript, and you can extend fastify module to add your custom session type. +This plugin supports typescript, and you can extend fastify module to add your custom session type. ```ts -// Use module imports rather than commonjs' require for correct declaration merging in TypeScript. +// Use module imports rather than commonjs' require for correct declaration merging in TypeScript. // Wrong ❌: // const fastifySession = require('@fastify/session'); diff --git a/types/types.d.ts b/types/types.d.ts index e7483c7..5d4a6ee 100644 --- a/types/types.d.ts +++ b/types/types.d.ts @@ -17,7 +17,7 @@ declare module 'fastify' { /** A session store. */ sessionStore: Readonly; } - + interface Session extends ExpressSessionData { } } @@ -129,7 +129,7 @@ declare namespace fastifySession { /** * The algorithm used to sign the cookie. - * + * * @default 'sha256' */ algorithm?: string;