mirror of
https://github.com/openai/codex.git
synced 2026-11-22 23:00:42 +00:00
refactor: extract auth crate from codex-core
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
//! into a one-shot CLI command while still producing a durable `codex-login.log` artifact that
|
||||
//! support can request from users.
|
||||
|
||||
use codex_core::CodexAuth;
|
||||
use codex_core::auth::AuthCredentialsStoreMode;
|
||||
use codex_core::auth::AuthMode;
|
||||
use codex_core::auth::CLIENT_ID;
|
||||
@@ -316,7 +315,10 @@ pub async fn run_login_with_device_code_fallback_to_browser(
|
||||
pub async fn run_login_status(cli_config_overrides: CliConfigOverrides) -> ! {
|
||||
let config = load_config_or_exit(cli_config_overrides).await;
|
||||
|
||||
match CodexAuth::from_auth_storage(&config.codex_home, config.cli_auth_credentials_store_mode) {
|
||||
match codex_core::from_auth_storage_with_core_client(
|
||||
&config.codex_home,
|
||||
config.cli_auth_credentials_store_mode,
|
||||
) {
|
||||
Ok(Some(auth)) => match auth.auth_mode() {
|
||||
AuthMode::ApiKey => match auth.get_token() {
|
||||
Ok(api_key) => {
|
||||
|
||||
Reference in New Issue
Block a user