OpenAI Codex
OpenAIAI API3 credentials
OpenAI API Key
openai-codex / openai-api-key
Codex supports OpenAI API key authentication through OPENAI_API_KEY and auth.json.
Looks like
examplesk-proj-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXsk-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXLocation
OPENAI_API_KEY~/.codex/auth.json, ~/.codex/config.toml, ~/.codex/.credentials.jsonDefault Codex home credential and config files on Unix-like systems; CODEX_HOME can relocate these files but is not itself credential material
%USERPROFILE%\.codex\auth.json, %USERPROFILE%\.codex\config.toml, %USERPROFILE%\.codex\.credentials.jsonDefault Codex home credential and config files on Windows
.codex/config.toml, .env, .env.local, .env.production, docker-compose.yml, compose.yml, devcontainer.jsonProject-local Codex and container/devcontainer files that may pass OPENAI_API_KEY or provider settings
OS keychain, GitHub Actions secrets, CI/CD variables, cloud secret managers, Docker secrets, and Kubernetes Secrets
Codex scripts, container wrappers, app-server config, tests, MCP configuration, and committed automation
Codex logs, shell history, CI traces, debug dumps, app-server logs, and terminal transcripts
Notes
Codex source uses CODEX_HOME as a base directory override. It is intentionally not listed as a credential-value env var.
ChatGPT Login Token
openai-codex / chatgpt-login-token
Codex auth.json can store ChatGPT login tokens and account auth state used instead of API-key auth.
Location
~/.codex/auth.json%USERPROFILE%\.codex\auth.jsonOS keychain or password vault entries used by Codex login flows
Debug logs, auth troubleshooting output, terminal transcripts, and copied auth.json content
Notes
No stable public token prefix was found in Codex docs/source; use exact auth.json location and field context.
MCP OAuth Credential
openai-codex / mcp-oauth-credential
Codex remote MCP support may persist OAuth credentials in keyring or a CODEX_HOME-backed fallback credentials file.
Location
~/.codex/.credentials.jsonCodex source documents fallback MCP OAuth credentials under CODEX_HOME/.credentials.json
%USERPROFILE%\.codex\.credentials.jsonOS keychain/keyring storage for MCP OAuth credentials
MCP auth debug output and OAuth callback traces
Notes
The default CODEX_HOME is ~/.codex; user-provided CODEX_HOME can relocate this file.
Scope
Authorized use
LOLCreds helps map the credential surface of real products: known defaults, generated values, credential locations, and exposure patterns.