Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/server/src/openclawGatewayTest.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ describe("runOpenclawGatewayTest", () => {
expect(connectParams?.client?.mode).toBe("backend");
expect(connectParams?.client?.displayName).toBe("OK Code gateway test");
expect(connectParams?.client?.deviceFamily).toBe("server");
expect(connectParams?.auth?.password).toBe("topsecret");
expect(connectParams?.auth?.token).toBeUndefined();
expect(connectParams?.auth?.token).toBe("topsecret");
expect(connectParams?.auth?.password).toBeUndefined();
expect(connectParams?.auth?.deviceToken).toBeUndefined();
expect(connectParams?.device?.id).toMatch(/^[a-f0-9]{64}$/);
expect(connectParams?.device?.id).not.toMatch(/^device_/);
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/provider/Layers/OpenClawGatewayClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ function buildConnectParams(input: {
const auth =
input.auth.kind === "password"
? {
password: input.auth.value,
token: input.auth.value,
}
: input.auth.kind === "deviceToken"
? {
Expand Down
16 changes: 16 additions & 0 deletions apps/web/src/components/sme/smeConversationConfig.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { describe, expect, it } from "vitest";

import { getDefaultSmeAuthMethod, getSmeAuthMethodOptions } from "./smeConversationConfig";

describe("smeConversationConfig", () => {
it("keeps OpenClaw auth copy aligned with shared secret/token terminology", () => {
const options = getSmeAuthMethodOptions("openclaw");

expect(getDefaultSmeAuthMethod("openclaw")).toBe("password");
expect(options).toEqual([
{ value: "password", label: "Gateway Shared Secret / Token" },
{ value: "none", label: "Device Token Only" },
{ value: "auto", label: "Auto (prefer shared secret/token)" },
]);
});
});
4 changes: 2 additions & 2 deletions apps/web/src/components/sme/smeConversationConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ export function getSmeAuthMethodOptions(
];
case "openclaw":
return [
{ value: "password", label: "Gateway Shared Secret" },
{ value: "password", label: "Gateway Shared Secret / Token" },
{ value: "none", label: "Device Token Only" },
{ value: "auto", label: "Auto (prefer shared secret)" },
{ value: "auto", label: "Auto (prefer shared secret/token)" },
];
case "gemini":
return [
Expand Down
13 changes: 13 additions & 0 deletions apps/web/src/lib/settingsProviderMetadata.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { describe, expect, it } from "vitest";

import { PROVIDER_AUTH_GUIDES } from "./settingsProviderMetadata";

describe("PROVIDER_AUTH_GUIDES", () => {
it("describes OpenClaw auth as a shared secret/token flow", () => {
const guide = PROVIDER_AUTH_GUIDES.openclaw;

expect(guide.authCmd).toBe("Use gateway shared secret/token");
expect(guide.note).toContain("shared secret/token");
expect(guide.note).toContain("remote gateways");
});
});
3 changes: 2 additions & 1 deletion apps/web/src/lib/settingsProviderMetadata.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ export const PROVIDER_AUTH_GUIDES: Record<ProviderKind, ProviderAuthGuide> = {
note: "GitHub Copilot must be installed and signed in before it appears in the thread picker.",
},
openclaw: {
authCmd: "Use gateway shared secret/token",
verifyCmd: "Test Connection",
note: "OpenClaw uses the gateway URL and shared secret below rather than a local CLI login. Shared-secret auth usually works without device pairing and is the recommended default for Tailscale and remote gateways.",
note: "OpenClaw uses the gateway URL and shared secret/token below rather than a local CLI login. Shared-secret auth usually works without device pairing and is the recommended default for Tailscale and remote gateways.",
},
};
6 changes: 4 additions & 2 deletions apps/web/src/routes/_chat.settings.index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ function AuthenticationStatusCard({
<div className="rounded-lg border border-border/60 bg-card/60 px-3 py-2">
<div className="font-medium text-foreground">Authenticate</div>
<code className="mt-1 block break-all text-[11px]">
{guide.authCmd ?? "Use gateway password"}
{guide.authCmd ?? "Use gateway shared secret/token"}
</code>
</div>
<div className="rounded-lg border border-border/60 bg-card/60 px-3 py-2">
Expand Down Expand Up @@ -1565,7 +1565,9 @@ function SettingsRouteView() {
</span>
</label>
<label htmlFor="openclaw-password" className="block">
<span className="block text-xs font-medium text-foreground">Password</span>
<span className="block text-xs font-medium text-foreground">
Shared Secret / Token
</span>
<Input
id="openclaw-password"
className="mt-1"
Expand Down
Loading