@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/mcp",
3
- "version": "1.0.45",
3
+ "version": "1.0.46",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
package/src/tool/oauth.ts CHANGED
@@ -668,7 +668,12 @@ export async function exchangeAuthorization(
668
668
  });
669
669
 
670
670
  if (addClientAuthentication) {
671
- addClientAuthentication(headers, params, authorizationServerUrl, metadata);
671
+ await addClientAuthentication(
672
+ headers,
673
+ params,
674
+ authorizationServerUrl,
675
+ metadata,
676
+ );
672
677
  } else {
673
678
  const supportedMethods =
674
679
  metadata?.token_endpoint_auth_methods_supported ?? [];
@@ -755,7 +760,12 @@ export async function refreshAuthorization(
755
760
  });
756
761
 
757
762
  if (addClientAuthentication) {
758
- addClientAuthentication(headers, params, authorizationServerUrl, metadata);
763
+ await addClientAuthentication(
764
+ headers,
765
+ params,
766
+ authorizationServerUrl,
767
+ metadata,
768
+ );
759
769
  } else {
760
770
  const supportedMethods =
761
771
  metadata?.token_endpoint_auth_methods_supported ?? [];