fix(pairing): warn that pairing links grant daemon access (#3734)

A pairing offer remains valid across daemon restarts, so remove the incorrect rotation guidance and warn users where the durable credential is displayed.
This commit is contained in:
Mohamed Boudra
2026-08-23 12:32:21 +02:00
committed by GitHub
parent 5123b23f41
commit 8d92e1cc17
14 changed files with 27 additions and 3 deletions
+3
View File
@@ -10,6 +10,9 @@ describe("formatPairingInstructions", () => {
expect(output).toContain(QR);
expect(output.split("\n")).toContain(URL);
expect(output).toContain(
"Treat this pairing link like a password. Anyone with it can access this daemon.",
);
});
it("does not print a QR that would reach the terminal edge", () => {
+1 -1
View File
@@ -33,5 +33,5 @@ function formatQr(qr: string | null, columns: number | undefined): string {
}
export function formatPairingInstructions({ url, qr, columns }: PairingInstructions): string {
return `\nScan to pair:\n${formatQr(qr, columns)}\n\nPairing link:\n${url}\n`;
return `\nScan to pair:\n${formatQr(qr, columns)}\n\nPairing link:\n${url}\n\nTreat this pairing link like a password. Anyone with it can access this daemon.\n`;
}