From a7b25f3bd8d073af5a23d29446cc4e7e2401964d Mon Sep 17 00:00:00 2001 From: Sheen Capadngan Date: Thu, 12 Dec 2024 00:24:36 +0800 Subject: [PATCH] misc: addressed module issue --- .../services/identity-jwt-auth/identity-jwt-auth-service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/services/identity-jwt-auth/identity-jwt-auth-service.ts b/backend/src/services/identity-jwt-auth/identity-jwt-auth-service.ts index 73cb0090d..aca96c145 100644 --- a/backend/src/services/identity-jwt-auth/identity-jwt-auth-service.ts +++ b/backend/src/services/identity-jwt-auth/identity-jwt-auth-service.ts @@ -1,6 +1,6 @@ import { ForbiddenError } from "@casl/ability"; import https from "https"; -import jwt, { JsonWebTokenError } from "jsonwebtoken"; +import jwt from "jsonwebtoken"; import { JwksClient } from "jwks-rsa"; import { IdentityAuthMethod, TIdentityJwtAuthsUpdate } from "@app/db/schemas"; @@ -113,7 +113,7 @@ export const identityJwtAuthServiceFactory = ({ tokenData = jwt.verify(jwtValue, publicKey) as Record; isMatchAnyKey = true; } catch (error) { - if (error instanceof JsonWebTokenError) { + if (error instanceof jwt.JsonWebTokenError) { errors.push(error.message); } }