You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Every rejected ChatGPT sign-in code is reported as expired #29091
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
I don't have a deterministic repro, because it depends on OpenAI's token endpoint rejecting a code. This comes from reading the code and from a report in dizys/t3code-docker#82.
Start a ChatGPT sign-in for Codex.
Complete it in a way that makes the token exchange return invalid_grant.
Expected behavior
The message doesn't claim a cause T3 Code can't know, for example: "OpenAI rejected this sign-in code. Start again."
Actual behavior
Every invalid_grant on an authorization code exchange is reported as an expired code:
L605-L611 shows "This sign-in code expired. Reconnect the saved ChatGPT profile to start a fresh sign-in."
invalid_grant also covers other failures, such as a code that was already used or a redirect URI that doesn't match. In the linked report, someone pasted the callback URL from a fresh attempt within about a minute and got this message every time. Waiting less can't fix a code that was rejected for another reason, so the message sends people the wrong way. We don't know what caused the rejection in that report.
Impact
Minor bug or occasional failure
Version or commit
Read on main at 333f7a6. The report came from an image bundling v0.1.2.
Environment
Not environment specific. The report used a remote browser with the pasted callback URL flow, on Linux in Docker.
Logs or stack traces
None available.
Screenshots, recordings, or supporting files
None.
Workaround
Use the existing CLI login instead of the ChatGPT connection.
Activity