( serverName: string, serverConfig: McpSSEServerConfig | McpHTTPServerConfig, )
| 618 | } |
| 619 | |
| 620 | export function clearServerTokensFromLocalStorage( |
| 621 | serverName: string, |
| 622 | serverConfig: McpSSEServerConfig | McpHTTPServerConfig, |
| 623 | ): void { |
| 624 | const storage = getSecureStorage() |
| 625 | const existingData = storage.read() |
| 626 | if (!existingData?.mcpOAuth) return |
| 627 | |
| 628 | const serverKey = getServerKey(serverName, serverConfig) |
| 629 | if (existingData.mcpOAuth[serverKey]) { |
| 630 | delete existingData.mcpOAuth[serverKey] |
| 631 | storage.update(existingData) |
| 632 | logMCPDebug(serverName, 'Cleared stored tokens') |
| 633 | } |
| 634 | } |
| 635 | |
| 636 | type WWWAuthenticateParams = { |
| 637 | scope?: string |
no test coverage detected