diff --git a/packages/oid4vci-issuer/src/functions.ts b/packages/oid4vci-issuer/src/functions.ts index cfcdc852..d355b31e 100644 --- a/packages/oid4vci-issuer/src/functions.ts +++ b/packages/oid4vci-issuer/src/functions.ts @@ -52,7 +52,7 @@ export function getJwtVerifyCallback({ verifyOpts }: { verifyOpts?: JWTVerifyOpt const header = jwtDecode(args.jwt, { header: true }) const payload = jwtDecode(args.jwt, { header: false }) const kid = args.kid ?? header.kid - const jwk = identifier.jwks.find((jwkInfo) => jwkInfo.jwk.kid == kid) + const jwk = !kid ? jwkInfo.jwk : undefined // TODO double-check if this is correct return { alg, ...identifier,