[Bug] Authentication Error (invalid_state) during login via CLI and Desktop App

Open 💬 4 comments Opened May 6, 2026 by ankitshah009

What version of the Codex App are you using (From “About Codex” dialog)?

Version 26.429.61741 (2429)

What subscription do you have?

ChatGPT Pro 20x version

What platform is your computer?

Darwin 25.5.0 arm64 arm

What issue are you seeing?

I am unable to authenticate using the Codex Desktop App and CLI. During the authentication flow, the process fails and returns the following error message: An error occurred during authentication (invalid_state). Please try again.

What steps can reproduce the bug?

  1. Open the Codex Desktop App / initialize the Codex CLI.
  2. Trigger the authentication/login process.
  3. Observe the invalid_state error returned during the auth handshake.[

<img width="912" height="790" alt="Image" src="https://github.com/user-attachments/assets/82ac8a89-7c49-479e-94bb-fb8fdc134a1c" />

](url)

What is the expected behavior?

The authentication process should complete successfully and authorize the CLI/Desktop app without throwing an invalid state error.

Additional information

_No response_

View original on GitHub ↗

4 Comments

BinhTran666 · 3 months ago

This error show up for me after entering phone number to verify the account.

ndavidb · 3 months ago

It's happening to me as well

vertmar-dev · 3 months ago

Having the same issue today

Wlllueluelue · 2 months ago

我也遇到了一样的问题,想问下现在是怎么解决的呢 ?