@ai-sdk/mcp 1.0.78 → 1.0.80
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/CHANGELOG.md +14 -0
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/tool/oauth.ts +6 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-sdk/mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.80",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"cross-spawn": "^7.0.6",
|
|
36
36
|
"pkce-challenge": "^5.0.0",
|
|
37
|
-
"@ai-sdk/provider": "3.0.
|
|
38
|
-
"@ai-sdk/provider-utils": "4.0.
|
|
37
|
+
"@ai-sdk/provider": "3.0.16",
|
|
38
|
+
"@ai-sdk/provider-utils": "4.0.51"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/cross-spawn": "^6.0.6",
|
package/src/tool/oauth.ts
CHANGED
|
@@ -582,7 +582,12 @@ function assertMetadataIssuerMatches(
|
|
|
582
582
|
metadata: AuthorizationServerMetadata,
|
|
583
583
|
expectedIssuer: string,
|
|
584
584
|
): void {
|
|
585
|
-
|
|
585
|
+
const issuerMatches =
|
|
586
|
+
metadata.issuer === expectedIssuer ||
|
|
587
|
+
(expectedIssuer === new URL(expectedIssuer).origin &&
|
|
588
|
+
metadata.issuer === `${expectedIssuer}/`);
|
|
589
|
+
|
|
590
|
+
if (!issuerMatches) {
|
|
586
591
|
throw new MCPClientOAuthError({
|
|
587
592
|
message: `OAuth authorization server metadata issuer ${metadata.issuer} does not match expected issuer ${expectedIssuer}`,
|
|
588
593
|
});
|