codex icon indicating copy to clipboard operation
codex copied to clipboard

Error logging in using a gpt account on Windows

Open lwh316658735 opened this issue 1 year ago • 9 comments

What version of Codex is running?

No response

Which model were you using?

No response

What platform is your computer?

No response

What steps can reproduce the bug?

Image

What is the expected behavior?

No response

What do you see instead?

No response

Additional information

No response

lwh316658735 avatar Aug 20 '25 03:08 lwh316658735

Can you share the output of codex --version?

seratch avatar Aug 20 '25 03:08 seratch

Can you share the output of ?codex --version

Sorry, I forgot. The version is.

PS C:\Users\31665\Desktop> .\codex-x86_64-pc-windows-msvc.exe --version codex-cli 0.23.0-alpha.6 PS C:\Users\31665\Desktop>

lwh316658735 avatar Aug 20 '25 03:08 lwh316658735

I am also experiencing a similar issue. After updating to the latest version, I am no longer able to log in via the browser.

codex --version codex-cli 0.22.0

Image

A 400 error means there is an invalid request from the client, so there may be an error in the generated link.

Isaka-code avatar Aug 20 '25 04:08 Isaka-code

You are most likely running into an issue with the conversion between ASCII characters and URL encoding. The : was being converted to %3A and the / to %2F. I manually corrected this, and I was able to log in.

Isaka-code avatar Aug 20 '25 04:08 Isaka-code

@Isaka-code Thanks for sharing this! Do you mean the redirect_uri parameter in https://auth.openai.com/oauth/authorize?... URL? If so, a URL-encoded parameter in the query string should generally work fine. Which browser are you using?

seratch avatar Aug 20 '25 05:08 seratch

@seratch Yes, I was referring to the redirect_uri. I use Chrome as well. I'm wondering if a recent version update might have caused a change, as I was able to log in without any issues before.

Isaka-code avatar Aug 20 '25 08:08 Isaka-code

Thanks for your reply. The localhost server part was recently fully rewritten, but I haven’t noticed any issues with the current code so far, and I haven’t encountered the error myself. We’ll need to identify the reproduction steps or the root cause of this error pattern.

seratch avatar Aug 20 '25 08:08 seratch

Image

Fresh 0.23 install after running npm install -g @openai/codex this morning

jlacroix42 avatar Aug 26 '25 15:08 jlacroix42

I suspect this issue is no longer relevant. @lwh316658735 and @Isaka-code, were you able to successfully log in with more recent versions of codex?

etraut-openai avatar Oct 28 '25 21:10 etraut-openai