Skip to content

Commit b74e9d9

Browse files
committed
Workaround for modelcontextprotocol#545
1 parent ea6d97d commit b74e9d9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/client/auth.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ export async function discoverOAuthProtectedResourceMetadata(
246246
throw error;
247247
}
248248
}
249-
250249
if (response.status === 404) {
251250
throw new Error(`Resource server does not implement OAuth 2.0 Protected Resource Metadata.`);
252251
}
@@ -269,8 +268,9 @@ export async function discoverOAuthMetadata(
269268
authorizationServerUrl: string | URL,
270269
opts?: { protocolVersion?: string },
271270
): Promise<OAuthMetadata | undefined> {
272-
const url = new URL("/.well-known/oauth-authorization-server", authorizationServerUrl);
271+
const url = new URL(".well-known/oauth-authorization-server", authorizationServerUrl);
273272
let response: Response;
273+
console.log("Discovering OAuth metadata at", url.toString());
274274
try {
275275
response = await fetch(url, {
276276
headers: {

0 commit comments

Comments
 (0)