@ai-sdk/mcp 1.0.45 → 1.0.46

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.mjs CHANGED
@@ -812,7 +812,12 @@ async function exchangeAuthorization(authorizationServerUrl, {
812
812
  redirect_uri: String(redirectUri)
813
813
  });
814
814
  if (addClientAuthentication) {
815
- addClientAuthentication(headers, params, authorizationServerUrl, metadata);
815
+ await addClientAuthentication(
816
+ headers,
817
+ params,
818
+ authorizationServerUrl,
819
+ metadata
820
+ );
816
821
  } else {
817
822
  const supportedMethods = (_a3 = metadata == null ? void 0 : metadata.token_endpoint_auth_methods_supported) != null ? _a3 : [];
818
823
  const authMethod = selectClientAuthMethod(
@@ -864,7 +869,12 @@ async function refreshAuthorization(authorizationServerUrl, {
864
869
  refresh_token: refreshToken
865
870
  });
866
871
  if (addClientAuthentication) {
867
- addClientAuthentication(headers, params, authorizationServerUrl, metadata);
872
+ await addClientAuthentication(
873
+ headers,
874
+ params,
875
+ authorizationServerUrl,
876
+ metadata
877
+ );
868
878
  } else {
869
879
  const supportedMethods = (_a3 = metadata == null ? void 0 : metadata.token_endpoint_auth_methods_supported) != null ? _a3 : [];
870
880
  const authMethod = selectClientAuthMethod(