@ai-sdk/mcp 2.0.43 → 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 +6 -0
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/tool/oauth.ts +6 -1
package/CHANGELOG.md
CHANGED
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
|
});
|