mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-08 07:41:08 +00:00
* 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)
25 lines
742 B
TypeScript
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");
|
|
});
|
|
});
|