(response: DeviceAuthStartResponse)
| 462 | } |
| 463 | |
| 464 | function assertDeviceAuthStart(response: DeviceAuthStartResponse): void { |
| 465 | if ( |
| 466 | !hasToken(response.deviceCode) || |
| 467 | !hasToken(response.userCode) || |
| 468 | !hasToken(response.verificationUri) |
| 469 | ) { |
| 470 | throw new AppError('COMMAND_FAILED', 'Cloud auth start returned an unusable response.'); |
| 471 | } |
| 472 | } |
| 473 | |
| 474 | function detectAuthMode( |
| 475 | env: EnvMap, |
no test coverage detected