Skip to content

Commit f4664c7

Browse files
committed
cleanup types
1 parent 506d907 commit f4664c7

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

client/src/components/AuthDebugger.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useEffect, useCallback } from "react";
1+
import { useCallback } from "react";
22
import { Button } from "@/components/ui/button";
33
import { InspectorOAuthClientProvider } from "../lib/auth";
44
import {
@@ -137,7 +137,7 @@ const AuthDebugger = ({
137137
const clientMetadata = provider.clientMetadata;
138138
// Add all supported scopes to client registration.
139139
if (metadata.scopes_supported) {
140-
clientMetadata["scope"] = metadata.scopes_supported.join(" ");
140+
clientMetadata.scope = metadata.scopes_supported.join(" ");
141141
}
142142

143143
const fullInformation = await registerClient(sseUrl, {
@@ -213,7 +213,7 @@ const AuthDebugger = ({
213213
} finally {
214214
updateAuthState({ isInitiatingAuth: false });
215215
}
216-
}, [sseUrl, authState, updateAuthState]);
216+
}, [sseUrl, authState, updateAuthState, validateOAuthMetadata]);
217217

218218
const handleStartOAuth = useCallback(async () => {
219219
if (!sseUrl) {

client/src/lib/auth.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
OAuthClientInformation,
55
OAuthTokens,
66
OAuthTokensSchema,
7+
OAuthClientMetadata,
78
} from "@modelcontextprotocol/sdk/shared/auth.js";
89
import { SESSION_KEYS, getServerSpecificKey } from "./constants";
910

@@ -17,7 +18,7 @@ export class InspectorOAuthClientProvider implements OAuthClientProvider {
1718
return window.location.origin + "/oauth/callback";
1819
}
1920

20-
get clientMetadata() {
21+
get clientMetadata(): OAuthClientMetadata {
2122
return {
2223
redirect_uris: [this.redirectUrl],
2324
token_endpoint_auth_method: "none",

0 commit comments

Comments
 (0)