codex icon indicating copy to clipboard operation
codex copied to clipboard

Codex cannot login to chatgpt plus account if created with email/password and then used google auth

Open ilkerhk opened this issue 1 year ago • 17 comments

What version of Codex is running?

0.39.0

Which model were you using?

N/A

What platform is your computer?

ubuntu

What steps can reproduce the bug?

I created a plus account using email/password then I also used google auth to login to same account. I can login to chatgpt website using both however "codex login" gives "get_chatgpt_account_error" error. See below for the detailed error message.

What is the expected behavior?

At least one of the authentication methods should work.

What do you see instead?

# If I use email/password to authenticate after "codex login"

Oops, an error occurred!
Route Error (500 ): {
  "error": {
    "message": "Error looking up ChatGPT account.",
    "type": "server_error",
    "param": null,
    "code": "get_chatgpt_account_error"
  }
}

# If I use goole auth after "codex login"

Authentication Error
An error occurred during authentication (get_chatgpt_account_error). Please try again.
You can contact us through our help center at help.openai.com if you keep seeing this error. (Please include the request ID 2bb93171c0496d3ec4d9e57df29f6ea4 in your email.)

Additional information

No response

ilkerhk avatar Sep 21 '25 16:09 ilkerhk

Image

I have the same problem too. On my friend’s account, Codex can log in even if they log in on my PC. But my account can’t log in anywhere, not on my PC or my friend’s PC.

nwaki1 avatar Sep 21 '25 21:09 nwaki1

+1, and the url provided with "Starting local login server on http://localhost:1455. If your browser did not open, navigate to this URL to authenticate:" does not lead to a valid endpoint (at least for me) ("https://auth.openai.com/oauth/authorize?response_type=code&client_id...")

ananddtyagi avatar Sep 21 '25 21:09 ananddtyagi

+1

ekajaya740 avatar Sep 22 '25 05:09 ekajaya740

An update, I've tried the below suggestions that help.openai.com suggested but none worked, still giving get_chatgpt_account_error :

  • logout all, clear cookies etc and after running "codex login" try incognito window
  • another browser
  • delete openai auth from google account then use password login
  • reset password

ilkerhk avatar Sep 22 '25 06:09 ilkerhk

+1

fikrilal avatar Sep 22 '25 10:09 fikrilal

+1

PapaNayel69 avatar Sep 22 '25 16:09 PapaNayel69

+1

hold the phone - instead of letting it open the link auto, i copied it from terminal and pasted into browser and it worked - not sure if it was just luck

rickoneeleven avatar Sep 22 '25 21:09 rickoneeleven

+1

psykeus avatar Sep 25 '25 15:09 psykeus

+1. I'm getting "localhost refused to connect" when redirected to http://localhost:1455/

spencer-ritual avatar Sep 30 '25 13:09 spencer-ritual

I had this issue with the latest binary release (codex-x86_64-pc-windows-msvc.exe) but when I installed it with npm it worked, don't know which one others tried, but try the npm one

Nullpoint56 avatar Oct 02 '25 01:10 Nullpoint56

I have the same issue. Here's the redirect URL:

http://localhost:1455/auth/callback&scope=openid%20profile%20email%20offline_access&code_challenge=XXXXX&code_challenge_method=S256&id_token_add_organizations=true&codex_cli_simplified_flow=true&state=XXXXX&originator=codex_vscode

When I open this URL in the browser, I get a "Not Found" error.

It seems like the extension isn't working properly because it requires Codex to be running on localhost. From what I understand, Codex requires a Linux environment. But I am not sure how to connect the Codex extension in VS Code with the Codex app, since the app still only works with an API key.

ertan2002 avatar Oct 07 '25 08:10 ertan2002

+1

kasik96 avatar Oct 31 '25 11:10 kasik96

Image

kasik96 avatar Oct 31 '25 11:10 kasik96

+1

vibecodingengine avatar Nov 07 '25 12:11 vibecodingengine

it works now. I have tested on windows and macOS. Both is fine. It seemst that they fixed the bug

ertan2002 avatar Nov 07 '25 13:11 ertan2002

+1

Shivam-Bhardwaj avatar Nov 11 '25 08:11 Shivam-Bhardwaj

Solved!

PapaNayel69 avatar Nov 18 '25 04:11 PapaNayel69