Commit 1db15fd
Fix race conditions in CLI auth credential fetching
Critical fixes for OAuth auth reliability:
1. /creds endpoint now checks for token existence, not just status
- Status='success' can be set before credentials are extracted
- Added hasToken field to error response for debugging
2. Added error passthrough in /creds endpoint
- Returns errorHint and recoverable for auth failures
- Allows frontend to show actionable error messages
3. Added retry loop for credential fetching in cloud API
- 5 retries with 1s delay (5s total wait)
- Handles race between OAuth completion and credential extraction
- Returns immediately on auth error (no retry)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <[email protected]>1 parent 8fde587 commit 1db15fd
2 files changed
+82
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
346 | | - | |
| 346 | + | |
| 347 | + | |
347 | 348 | | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
357 | 384 | | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
362 | 405 | | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | 406 | | |
368 | | - | |
369 | | - | |
370 | 407 | | |
371 | 408 | | |
372 | 409 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
374 | | - | |
375 | | - | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
376 | 397 | | |
377 | 398 | | |
378 | 399 | | |
379 | 400 | | |
380 | 401 | | |
| 402 | + | |
| 403 | + | |
381 | 404 | | |
382 | 405 | | |
383 | 406 | | |
| |||
0 commit comments