fix(auth): brand codex oauth as openclaw

This commit is contained in:
Vincent Koc
2026-04-11 00:30:36 +01:00
parent 985ae5edca
commit fa44a31920
2 changed files with 5 additions and 0 deletions
+3
View File
@@ -81,6 +81,9 @@ describe("loginOpenAICodexOAuth", () => {
expect(result).toEqual(creds);
expect(mocks.loginOpenAICodex).toHaveBeenCalledOnce();
expect(mocks.loginOpenAICodex).toHaveBeenCalledWith(
expect.objectContaining({ originator: "openclaw" }),
);
expect(spin.stop).toHaveBeenCalledWith("OpenAI OAuth complete");
expect(runtime.error).not.toHaveBeenCalled();
});
@@ -9,6 +9,7 @@ import {
} from "./provider-openai-codex-oauth-tls.js";
const manualInputPromptMessage = "Paste the authorization code (or full redirect URL):";
const openAICodexOAuthOriginator = "openclaw";
export async function loginOpenAICodexOAuth(params: {
prompter: WizardPrompter;
@@ -61,6 +62,7 @@ export async function loginOpenAICodexOAuth(params: {
const creds = await loginOpenAICodex({
onAuth: baseOnAuth,
onPrompt,
originator: openAICodexOAuthOriginator,
onManualCodeInput: isRemote
? async () =>
await onPrompt({