{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreiekmt6kzejwbakaexuwymi467zcrhgc7fe4bmflspieriybpkh63e",
    "uri": "at://did:plc:lk3jfj3zq4k4wxnk474axylu/app.bsky.feed.post/3mms227pxnz52"
  },
  "path": "/t/codex-cli-login-fails-on-windows-auth-openai-com-reachable-via-curl-but-oauth-device-auth-fail/1381736#post_3",
  "publishedAt": "2026-05-26T21:44:36.000Z",
  "site": "https://community.openai.com",
  "tags": [
    "@Vultieris"
  ],
  "textContent": "Thanks for the detailed writeup, and good call from @Vultieris too.\n\nThis does look more like the CLI is getting blocked or redirected during the auth request, especially with the `Unexpected token '<'` hint. That usually means something expected JSON but got an HTML page back instead.\n\nSince PowerShell can reach the endpoint, I’d next try:\n\n  * Run `codex login --device-auth` from a clean PowerShell session\n  * Temporarily disable VPN, antivirus web filtering, DNS filtering, and corporate/security proxy tools\n  * Try the same login from WSL or another Windows user profile\n  * Test on a different network, like mobile hotspot\n\n\n\nAPI key login is probably the best workaround for now. Sanitized CLI debug logs would be useful, but definitely do not share `auth.json`, cookies, tokens, or keys.\n\n-Mark G.",
  "title": "Codex CLI login fails on Windows: auth.openai.com reachable via curl but OAuth/device-auth fail"
}