@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/dist/index.mjs
CHANGED
|
@@ -810,7 +810,8 @@ function buildDiscoveryUrls(authorizationServerUrl) {
|
|
|
810
810
|
return urlsToTry;
|
|
811
811
|
}
|
|
812
812
|
function assertMetadataIssuerMatches(metadata, expectedIssuer) {
|
|
813
|
-
|
|
813
|
+
const issuerMatches = metadata.issuer === expectedIssuer || expectedIssuer === new URL(expectedIssuer).origin && metadata.issuer === `${expectedIssuer}/`;
|
|
814
|
+
if (!issuerMatches) {
|
|
814
815
|
throw new MCPClientOAuthError({
|
|
815
816
|
message: `OAuth authorization server metadata issuer ${metadata.issuer} does not match expected issuer ${expectedIssuer}`
|
|
816
817
|
});
|