fix(auth): brand codex oauth as openclaw
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user