@sphereon/oid4vci-client 0.19.1-next.226 → 0.19.1-next.234

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1238,6 +1238,7 @@ var createAuthorizationRequestUrl = /* @__PURE__ */ __name(async ({ pkce, endpoi
1238
1238
  } else {
1239
1239
  logger4.debug(`PAR response: ${JSON.stringify(parResponse.successBody, null, 2)}`);
1240
1240
  queryObj = {
1241
+ /*response_type: ResponseType.AUTH_CODE,*/
1241
1242
  client_id,
1242
1243
  request_uri: parResponse.successBody.request_uri
1243
1244
  };
@@ -1392,7 +1393,17 @@ function findAuthorizationDetail(authorizationDetails, preferredConfigId) {
1392
1393
  return void 0;
1393
1394
  }
1394
1395
  if (preferredConfigId) {
1395
- const match = openIdCredentialDetails.find((detail) => typeof detail === "object" && detail !== null && detail.credential_configuration_id === preferredConfigId);
1396
+ const match = openIdCredentialDetails.find((detail) => {
1397
+ if (typeof detail !== "object" || detail === null) return false;
1398
+ const detailObj = detail;
1399
+ if (detailObj.credential_configuration_id === preferredConfigId) {
1400
+ return true;
1401
+ }
1402
+ if (detailObj.credential_identifier === preferredConfigId) {
1403
+ return true;
1404
+ }
1405
+ return Array.isArray(detailObj.credential_identifiers) && detailObj.credential_identifiers.includes(preferredConfigId);
1406
+ });
1396
1407
  if (match) {
1397
1408
  return match;
1398
1409
  }
@@ -2940,6 +2951,7 @@ ${JSON.stringify(response.errorBody)}`);
2940
2951
  if (!this.shouldRetryWithFreshNonce(e)) {
2941
2952
  return Promise.reject(e instanceof Error ? e : Error(String(e)));
2942
2953
  }
2954
+ ;
2943
2955
  this._state.cachedCNonce = void 0;
2944
2956
  try {
2945
2957
  await this.acquireNonceViaV15Delegate();