From fd5fef56df926d524c9824b9565f1ad3b7c9072f Mon Sep 17 00:00:00 2001 From: Lordfirespeed <28568841+Lordfirespeed@users.noreply.github.com> Date: Sat, 24 Aug 2024 14:51:41 +0100 Subject: [PATCH] update readme a lil bit --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 83663ab..177c3c2 100644 --- a/README.md +++ b/README.md @@ -139,7 +139,7 @@ const doubleCsrfUtilities = doubleCsrf({ ### `getSecret` ```ts -type GetSecretType = (request?: Request) => string | string[] +type GetSecretType = (request: Request, response: Response) => string | string[] | Promise ```

Required

@@ -154,7 +154,7 @@ the previous secret (which might still be used by some users) right away. ### `getSessionIdentifier` ```ts -type GetSessionIdentifierType = (request: Request) => string; +type GetSessionIdentifierType = (request: Request, response: Response) => string | Promise; ```

Required

@@ -255,7 +255,7 @@ type DelimiterType = string; ### `getTokenFromRequest` ```ts -(req: Request) => string | null | undefined; +(req: Request, res: Response) => string | null | undefined; ```

@@ -408,7 +408,7 @@ This error is customizable via [`errorConfig`](#configuration-error-config). ### `validateToken` ```ts -type ValidateToken = (req: Request) => boolean; +type ValidateToken = (req: Request, res: Response) => boolean; ``` This function is used by the doubleCsrfProtection middleware to determine whether an incoming request has a valid