@ai-sdk/mcp 2.0.42 → 2.0.44
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 +13 -0
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/tool/oauth.ts +6 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @ai-sdk/mcp
|
|
2
2
|
|
|
3
|
+
## 2.0.44
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 809e922: fix(mcp): accept trailing slashes on origin-only OAuth issuers
|
|
8
|
+
|
|
9
|
+
## 2.0.43
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [6bcc0f8]
|
|
14
|
+
- @ai-sdk/provider-utils@5.0.36
|
|
15
|
+
|
|
3
16
|
## 2.0.42
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -840,7 +840,8 @@ function buildDiscoveryUrls(authorizationServerUrl) {
|
|
|
840
840
|
return urlsToTry;
|
|
841
841
|
}
|
|
842
842
|
function assertMetadataIssuerMatches(metadata, expectedIssuer) {
|
|
843
|
-
|
|
843
|
+
const issuerMatches = metadata.issuer === expectedIssuer || expectedIssuer === new URL(expectedIssuer).origin && metadata.issuer === `${expectedIssuer}/`;
|
|
844
|
+
if (!issuerMatches) {
|
|
844
845
|
throw new MCPClientOAuthError({
|
|
845
846
|
message: `OAuth authorization server metadata issuer ${metadata.issuer} does not match expected issuer ${expectedIssuer}`
|
|
846
847
|
});
|