Skip to content

[Bug]: Every rejected ChatGPT sign-in code is reported as expired #29091

Open

Description

@dizys

Before submitting

  • 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.

  1. Start a ChatGPT sign-in for Codex.
  2. 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:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions