Files
openclaw/src/gateway/test-helpers.server.test.ts
Nimrod Gutman 69fe999373 fix(pairing): restore qr bootstrap onboarding handoff (#58382) (thanks @ngutman)
* fix(pairing): restore qr bootstrap onboarding handoff

* fix(pairing): tighten bootstrap handoff follow-ups

* fix(pairing): migrate legacy gateway device auth

* fix(pairing): narrow qr bootstrap handoff scope

* fix(pairing): clear ios tls trust on onboarding reset

* fix(pairing): restore qr bootstrap onboarding handoff (#58382) (thanks @ngutman)
2026-03-31 21:11:35 +03:00

25 lines
742 B
TypeScript

import { describe, expect, it } from "vitest";
import { testOnlyResolveAuthTokenForSignature } from "./test-helpers.server.js";
describe("testOnlyResolveAuthTokenForSignature", () => {
it("matches connect auth precedence for bootstrap tokens", () => {
expect(
testOnlyResolveAuthTokenForSignature({
token: undefined,
bootstrapToken: "bootstrap-token",
deviceToken: "device-token",
}),
).toBe("bootstrap-token");
});
it("still prefers the shared token when present", () => {
expect(
testOnlyResolveAuthTokenForSignature({
token: "shared-token",
bootstrapToken: "bootstrap-token",
deviceToken: "device-token",
}),
).toBe("shared-token");
});
});