(
clientInformation: OAuthClientInformationFull,
)
| 1511 | } |
| 1512 | |
| 1513 | async saveClientInformation( |
| 1514 | clientInformation: OAuthClientInformationFull, |
| 1515 | ): Promise<void> { |
| 1516 | const storage = getSecureStorage() |
| 1517 | const existingData = storage.read() || {} |
| 1518 | const serverKey = getServerKey(this.serverName, this.serverConfig) |
| 1519 | |
| 1520 | const updatedData: SecureStorageData = { |
| 1521 | ...existingData, |
| 1522 | mcpOAuth: { |
| 1523 | ...existingData.mcpOAuth, |
| 1524 | [serverKey]: { |
| 1525 | ...existingData.mcpOAuth?.[serverKey], |
| 1526 | serverName: this.serverName, |
| 1527 | serverUrl: this.serverConfig.url, |
| 1528 | clientId: clientInformation.client_id, |
| 1529 | clientSecret: clientInformation.client_secret, |
| 1530 | // Provide default values for required fields if not present |
| 1531 | accessToken: existingData.mcpOAuth?.[serverKey]?.accessToken || '', |
| 1532 | expiresAt: existingData.mcpOAuth?.[serverKey]?.expiresAt || 0, |
| 1533 | }, |
| 1534 | }, |
| 1535 | } |
| 1536 | |
| 1537 | storage.update(updatedData) |
| 1538 | } |
| 1539 | |
| 1540 | async tokens(): Promise<OAuthTokens | undefined> { |
| 1541 | // Cross-process token changes (another CC instance refreshed or invalidated) |
nothing calls this directly
no test coverage detected