Cannot use "Sign in with ChatGPT" to login on ubuntu server

Resolved 💬 3 comments Opened Aug 13, 2025 by applepig Closed Aug 19, 2025

What version of Codex is running?

codex-cli 0.21.0

Which model were you using?

gpt-5 hopefully

What platform is your computer?

Linux 6.8.0-71-generic #71-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 22 16:52:38 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

What steps can reproduce the bug?

Hi, my situation is a little bit complex. I think it's not the Python path issue.

  1. Exec codex on Ubuntu server.
  2. Select "Sign in with ChatGPT"
  3. It shows me a url for login. ( https://auth.openai.com/oauth/authorize?... , with redirect_uri=http://localhost:1455...
  4. Copy the url, and paste on to Windows Chrome.
  5. Login with my account successful.
  6. Redirect to http://localhost:1455...
  7. Since the localhost is on a diffrent machine, it would not work.

--

2rd attempt:

1,2,3. as above

  1. Modify the url width http://toybox:1455, and copy on to Windows Chrome
  2. as above.
  3. Redirect to http://toybox:1455...
  4. Timeout after a several seconds.

--

3rd attempt:

1,2,3 as above

  1. Open the url in lynx.
  2. Cannot login

What is the expected behavior?

Other platforms behavior:

gemini-cli

  1. shows a key phrase
  2. copy the key phrase and paste back to ubuntu.

cursor-agent

  1. shows "login success"
  2. and cursor-agent automatically grant for login

What do you see instead?

_No response_

Additional information

_No response_

View original on GitHub ↗

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