misc: addressed module issue

This commit is contained in:
Sheen Capadngan
2024-12-12 00:24:36 +08:00
parent 7896b4e85e
commit a7b25f3bd8

View File

@@ -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<string, string>;
isMatchAnyKey = true;
} catch (error) {
if (error instanceof JsonWebTokenError) {
if (error instanceof jwt.JsonWebTokenError) {
errors.push(error.message);
}
}