From f8669e78621f20e24d13f5847fd0d806e1046dae Mon Sep 17 00:00:00 2001 From: Daniel Liburd Date: Tue, 14 Nov 2023 12:25:35 +0000 Subject: [PATCH 1/2] Update dependency jwt-decode to v4 --- package-lock.json | 11 +++++++---- package.json | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 51e365bf8..85c950ff0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,7 +37,7 @@ "jquery": "^3.6.1", "jsonpath": "^1.1.1", "jsonschema": "^1.4.1", - "jwt-decode": "^3.1.2", + "jwt-decode": "^4.0.0", "lodash.escaperegexp": "^4.1.2", "method-override": "^3.0.0", "nocache": "^4.0.0", @@ -11316,9 +11316,12 @@ } }, "node_modules/jwt-decode": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-3.1.2.tgz", - "integrity": "sha512-UfpWE/VZn0iP50d8cz9NrZLM9lSWhcJ+0Gt/nm4by88UL+J1SiKN8/5dkjMmbEzwL2CAe+67GsegCbIKtbp75A==" + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-4.0.0.tgz", + "integrity": "sha512-+KJGIyHgkGuIq3IEBNftfhW/LfWhXUIY6OmyVWjliu5KH1y0fw7VQ8YndE2O4qZdMSd9SqbnC8GOcZEy0Om7sA==", + "engines": { + "node": ">=18" + } }, "node_modules/keygrip": { "version": "1.1.0", diff --git a/package.json b/package.json index b6f0f5d0f..58cc11e55 100644 --- a/package.json +++ b/package.json @@ -155,7 +155,7 @@ "jquery": "^3.6.1", "jsonpath": "^1.1.1", "jsonschema": "^1.4.1", - "jwt-decode": "^3.1.2", + "jwt-decode": "^4.0.0", "lodash.escaperegexp": "^4.1.2", "method-override": "^3.0.0", "nocache": "^4.0.0", From dc3c685df47c8ddb961415fa5f70e3c57cd52c77 Mon Sep 17 00:00:00 2001 From: Daniel Liburd Date: Tue, 14 Nov 2023 12:25:48 +0000 Subject: [PATCH 2/2] Update jwt-decode import to be compatible with v4 --- server/middleware/authorisationMiddleware.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/middleware/authorisationMiddleware.ts b/server/middleware/authorisationMiddleware.ts index e0a75147a..62283814a 100644 --- a/server/middleware/authorisationMiddleware.ts +++ b/server/middleware/authorisationMiddleware.ts @@ -1,4 +1,4 @@ -import jwtDecode from 'jwt-decode' +import { jwtDecode } from 'jwt-decode' import type { RequestHandler } from 'express' import logger from '../../logger'