1#![allow(clippy::unreachable, clippy::map_err_ignore)]
2#![allow(missing_docs, dead_code, unused_imports)]
3mod auth_service;
6pub mod codex_auth_import;
7mod config;
8pub mod credentials;
9pub mod mcp_oauth;
10pub mod oauth_server;
11pub mod openai_chatgpt_oauth;
12pub mod openrouter_oauth;
13pub mod pkce;
14mod storage_paths;
15
16pub use auth_service::OpenAIAccountAuthService;
17pub use codex_auth_import::{
18 CodexAuthJsonRefresher, codex_auth_json_exists, codex_auth_json_path, codex_auth_json_refresher, codex_home_dir,
19 try_load_codex_chatgpt_session,
20};
21pub use config::{AuthConfig, CopilotAuthConfig, OpenAIAuthConfig, OpenAIPreferredMethod};
22pub use credentials::{
23 AuthCredentialsStoreMode, CredentialIdentity, CredentialStorage, CustomApiKeyStorage, clear_custom_api_keys,
24 load_custom_api_keys, migrate_custom_api_keys,
25};
26pub use mcp_oauth::{
27 McpOAuthConfig, McpOAuthLoginCompletion, McpOAuthPreparedLogin, McpOAuthService, McpOAuthStatus, McpOAuthToken,
28};
29pub use oauth_server::{
30 AuthCallbackOutcome, AuthCodeCallbackServer, OAuthCallbackPage, OAuthProvider, run_auth_code_callback_server,
31 start_auth_code_callback_server,
32};
33pub use openai_chatgpt_oauth::{
34 OpenAIChatGptAuthHandle, OpenAIChatGptAuthStatus, OpenAIChatGptSession, OpenAIChatGptSessionProvenance,
35 OpenAIChatGptSessionRefresher, OpenAICredentialOverview, OpenAIResolvedAuth, OpenAIResolvedAuthSource,
36 clear_openai_chatgpt_session, clear_openai_chatgpt_session_with_mode, exchange_openai_chatgpt_code_for_tokens,
37 generate_openai_oauth_state, get_openai_chatgpt_auth_status, get_openai_chatgpt_auth_status_with_mode,
38 get_openai_chatgpt_auth_url, load_openai_chatgpt_session, load_openai_chatgpt_session_with_mode,
39 parse_openai_chatgpt_manual_callback_input, refresh_openai_chatgpt_session_with_mode, resolve_openai_auth,
40 save_openai_chatgpt_session, save_openai_chatgpt_session_with_mode, summarize_openai_credentials,
41};
42pub use openrouter_oauth::{
43 AuthStatus, OpenRouterOAuthConfig, OpenRouterToken, clear_oauth_token, clear_oauth_token_with_mode,
44 exchange_code_for_token, get_auth_status, get_auth_status_with_mode, get_auth_url, load_oauth_token,
45 load_oauth_token_with_mode, save_oauth_token, save_oauth_token_with_mode,
46};
47pub use pkce::{PkceChallenge, generate_pkce_challenge};