(flowId: string)
| 308 | } |
| 309 | |
| 310 | async cancelDeviceFlow(flowId: string): Promise<void> { |
| 311 | const flow = this.deviceFlows.get(flowId); |
| 312 | if (!flow) return; |
| 313 | |
| 314 | log.debug(`[Codex OAuth] Device flow cancelled (flowId=${flowId})`); |
| 315 | await this.finishDeviceFlow(flowId, Err("OAuth flow cancelled")); |
| 316 | } |
| 317 | |
| 318 | async getValidAuth(): Promise<Result<CodexOauthAuth, string>> { |
| 319 | const stored = this.readStoredAuth(); |
no test coverage detected