MCPcopy Create free account
hub / github.com/modelcontextprotocol/inspector / checkTokens

Function checkTokens

client/src/components/AuthDebugger.tsx:73–86  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

71 useEffect(() => {
72 if (serverUrl && !authState.oauthTokens) {
73 const checkTokens = async () => {
74 try {
75 const provider = new DebugInspectorOAuthClientProvider(serverUrl);
76 const existingTokens = await provider.tokens();
77 if (existingTokens) {
78 updateAuthState({
79 oauthTokens: existingTokens,
80 oauthStep: "complete",
81 });
82 }
83 } catch (error) {
84 console.error("Failed to load existing OAuth tokens:", error);
85 }
86 };
87 checkTokens();
88 }
89 }, [serverUrl, updateAuthState, authState.oauthTokens]);

Callers 1

AuthDebuggerFunction · 0.85

Calls 2

updateAuthStateFunction · 0.85
tokensMethod · 0.80

Tested by

no test coverage detected