()
| 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]); |
no test coverage detected