@sphereon/oid4vci-client 0.21.1-next.2 → 0.21.1

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
@@ -830,6 +830,9 @@ var AccessTokenClient = class _AccessTokenClient {
830
830
  }
831
831
  request.grant_type = import_oid4vci_common9.GrantTypes.PRE_AUTHORIZED_CODE;
832
832
  request[import_oid4vci_common9.PRE_AUTH_CODE_LITERAL] = credentialOfferRequest?.credential_offer.grants?.[import_oid4vci_common9.PRE_AUTH_GRANT_LITERAL]?.[import_oid4vci_common9.PRE_AUTH_CODE_LITERAL];
833
+ if (request.client_id && !request.client_secret && opts.additionalParams?.client_id === void 0) {
834
+ delete request.client_id;
835
+ }
833
836
  return request;
834
837
  }
835
838
  throw new Error("Credential offer request follows neither pre-authorized code nor authorization code flow requirements.");