CERT_HAS_EXPIRED on Windows native install during OAuth login, no proxy/VPN/AV — curl succeeds on same host

Open 💬 13 comments Opened Jun 26, 2026 by bjones9942

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

claude /login fails with CERT_HAS_EXPIRED connecting to platform.claude.com during OAuth token exchange. Browser authorize step succeeds; CLI token exchange fails.

curl -vI https://platform.claude.com from same machine returns clean HTTP 200, valid cert. No proxy. VPN on/off tested, no change. No third-party AV (Defender only). System clock correct.

CLAUDE_CODE_CERT_STORE=system and BUN_USE_OPENSSL_CA=1 tried, no effect.

claude doctor shows "Search: OK (bundled)" succeeding but "Failed to fetch versions" failing in same run.

What Should Happen?

Login should complete, consistent with curl's successful TLS handshake to the same host.

Error Messages/Logs

Unable to connect to Anthropic services
Failed to connect to platform.claude.com: CERT_HAS_EXPIRED
SSL certificate error (CERT_HAS_EXPIRED). If you are behind a corporate proxy or TLS-intercepting firewall, set NODE_EXTRA_CA_CERTS to your CA bundle path, or ask IT to allowlist *.anthropic.com. Run /doctor for details.

Steps to Reproduce

  1. Install Claude Code on Windows via winget (Anthropic.ClaudeCode)
  2. Open PowerShell
  3. Run: claude auth /login
  4. Browser opens, click Authorize
  5. CLI fails to complete token exchange with: CERT_HAS_EXPIRED connecting to platform.claude.com
  6. Run: curl -vI https://platform.claude.com (in same shell) — returns clean HTTP 200, valid certificate

Claude Model

Not sure / Multiple models

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.193

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

Auto-update attempted to 2.1.195 per claude doctor.

View original on GitHub ↗

This issue has 13 comments on GitHub. Read the full discussion on GitHub ↗