diff --git a/package-lock.json b/package-lock.json index 99f7ccb6..84e55a6c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12304,9 +12304,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/keyv": { "version": "4.5.4", @@ -19089,7 +19092,7 @@ "version": "1.3.11", "license": "ISC", "dependencies": { - "jwt-decode": "^3.1.2" + "jwt-decode": "^4.0.0" }, "peerDependencies": { "@nestjs/common": ">=8", @@ -19197,7 +19200,7 @@ "@algoan/nestjs-custom-decorators": { "version": "file:packages/custom-decorators", "requires": { - "jwt-decode": "^3.1.2" + "jwt-decode": "^4.0.0" } }, "@algoan/nestjs-google-pubsub-client": { @@ -28281,9 +28284,9 @@ } }, "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==" }, "keyv": { "version": "4.5.4", diff --git a/packages/custom-decorators/package-lock.json b/packages/custom-decorators/package-lock.json index 52f9e0cb..aacc1a1e 100644 --- a/packages/custom-decorators/package-lock.json +++ b/packages/custom-decorators/package-lock.json @@ -9,7 +9,7 @@ "version": "1.3.11", "license": "ISC", "dependencies": { - "jwt-decode": "^3.1.2" + "jwt-decode": "^4.0.0" }, "peerDependencies": { "@nestjs/common": ">=8", diff --git a/packages/custom-decorators/package.json b/packages/custom-decorators/package.json index d8860ee3..7615b31f 100644 --- a/packages/custom-decorators/package.json +++ b/packages/custom-decorators/package.json @@ -36,7 +36,7 @@ "url": "https://github.com/algoan/nestjs-components/issues" }, "dependencies": { - "jwt-decode": "^3.1.2" + "jwt-decode": "^4.0.0" }, "peerDependencies": { "@nestjs/common": ">=8", diff --git a/packages/custom-decorators/src/decode-jwt.decorator.ts b/packages/custom-decorators/src/decode-jwt.decorator.ts index 4b5feaf3..d5a2ec41 100644 --- a/packages/custom-decorators/src/decode-jwt.decorator.ts +++ b/packages/custom-decorators/src/decode-jwt.decorator.ts @@ -1,5 +1,5 @@ import { createParamDecorator, ExecutionContext, UnauthorizedException } from '@nestjs/common'; -import jwtDecode from 'jwt-decode'; +import { jwtDecode } from 'jwt-decode'; export const DecodeJWT: () => ParameterDecorator = createParamDecorator( async (_data: unknown, ctx: ExecutionContext): Promise => {