[codex] Address external auth review feedback

This commit is contained in:
Liang-Ting Jiang
2026-06-27 04:13:25 +00:00
parent 0bf810d417
commit 0b72ec4c10
33 changed files with 346 additions and 241 deletions
+5 -5
View File
@@ -1327,7 +1327,7 @@ fn stored_auth_mode(auth: &codex_login::AuthDotJson) -> &'static str {
AuthMode::ApiKey => "api_key",
AuthMode::Chatgpt => "chatgpt",
AuthMode::ChatgptAuthTokens => "chatgpt_auth_tokens",
AuthMode::CallerProvided => "caller_provided",
AuthMode::ExternalProvided => "external_provided",
AuthMode::AgentIdentity => "agent_identity",
AuthMode::PersonalAccessToken => "personal_access_token",
AuthMode::BedrockApiKey => "bedrock_api_key",
@@ -1398,8 +1398,8 @@ fn stored_auth_issues(
issues.push("external ChatGPT auth is missing refresh metadata");
}
}
AuthMode::CallerProvided => {
issues.push("caller-provided auth cannot be loaded from auth storage");
AuthMode::ExternalProvided => {
issues.push("externally provided auth cannot be loaded from auth storage");
}
AuthMode::AgentIdentity => {
if auth
@@ -2470,7 +2470,7 @@ fn auth_mode_name(auth: &CodexAuth) -> &'static str {
AuthMode::ApiKey => "api_key",
AuthMode::Chatgpt => "chatgpt",
AuthMode::ChatgptAuthTokens => "chatgpt_auth_tokens",
AuthMode::CallerProvided => "caller_provided",
AuthMode::ExternalProvided => "external_provided",
AuthMode::AgentIdentity => "agent_identity",
AuthMode::PersonalAccessToken => "personal_access_token",
AuthMode::BedrockApiKey => "bedrock_api_key",
@@ -2610,7 +2610,7 @@ fn provider_auth_reachability_mode_from_auth(
Some(
AuthMode::Chatgpt
| AuthMode::ChatgptAuthTokens
| AuthMode::CallerProvided
| AuthMode::ExternalProvided
| AuthMode::AgentIdentity
| AuthMode::PersonalAccessToken,
)
+2 -2
View File
@@ -449,8 +449,8 @@ pub async fn run_login_status(cli_config_overrides: CliConfigOverrides) -> ! {
eprintln!("Logged in using ChatGPT");
std::process::exit(0);
}
AuthMode::CallerProvided => {
eprintln!("Logged in using caller-provided auth");
AuthMode::ExternalProvided => {
eprintln!("Logged in using externally provided auth");
std::process::exit(0);
}
AuthMode::AgentIdentity => {