fix(doctor): avoid impossible device token rotation advice · openclaw/openclaw@f5f11b8
2026-05-05
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -474,25 +474,25 @@ function collectLocalDeviceAuthIssues(snapshot: DoctorPairingSnapshot): string[]
|
474 | 474 | if (!role) { |
475 | 475 | continue; |
476 | 476 | } |
477 | | -const rotateCommand = formatCliArgs([ |
478 | | -"openclaw", |
479 | | -"devices", |
480 | | -"rotate", |
481 | | -"--device", |
482 | | -paired.deviceId, |
483 | | -"--role", |
484 | | -role, |
485 | | -]); |
486 | 477 | const pairedToken = findTokenSummary(paired, role); |
487 | 478 | if (!pairedToken) { |
488 | 479 | if (approvedRoles.has(role)) { |
489 | 480 | continue; |
490 | 481 | } |
491 | 482 | lines.push( |
492 | | -`- Local cached ${role} device auth for ${deviceLabel} no longer has a matching active gateway token. Reconnect with shared gateway auth to refresh it, or rotate with ${rotateCommand}.`, |
| 483 | +`- Local cached ${role} device auth for ${deviceLabel} no longer has a matching active gateway token, and that role is no longer approved for this device. Reconnect with shared gateway auth to refresh local auth, or remove the stale cached ${role} auth entry.`, |
493 | 484 | ); |
494 | 485 | continue; |
495 | 486 | } |
| 487 | +const rotateCommand = formatCliArgs([ |
| 488 | +"openclaw", |
| 489 | +"devices", |
| 490 | +"rotate", |
| 491 | +"--device", |
| 492 | +paired.deviceId, |
| 493 | +"--role", |
| 494 | +role, |
| 495 | +]); |
496 | 496 | const gatewayIssuedAtMs = pairedToken.rotatedAtMs ?? pairedToken.createdAtMs; |
497 | 497 | if (entry.updatedAtMs < gatewayIssuedAtMs) { |
498 | 498 | lines.push( |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。