Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Transient OAuth login failure persists in getLoginStatus and masks active account in dashboard

Closed Beginner friendly
#7,378 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

  • #7384 by @yobushka — closed without merging

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
67/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript

Research direction

Read src/oauth/index.ts and trace how getLoginStatus(provider) combines persisted account status with loginState errors; then inspect cancelLoginFlow and the OAuth status and cancel endpoint tests, if present. Reproduce the reported failed-login sequence with an existing active account. Done when status no longer reports a finalized login error over a valid active account, and the cancel behavior is covered.

Written by the indexing model from the issue text.

Description

account-pool bug gui
Client or integration

OpenCodex dashboard

Area

Authentication and account pool

Summary

When an interactive OAuth login attempt is interrupted, cancelled, or fails (e.g. user closes the browser auth window or an aborted attempt occurs), loginState.get(provider) retains { done: true, error: "OAuth authentication failed. Check the OpenCodex account status and retry." } in runtime memory.

Subsequently, getLoginStatus(provider) in src/oauth/index.ts continues returning error: st?.error on every poll to /api/oauth/status?provider=google-antigravity, even if a valid account is already persisted in auth.json and active (loggedIn: true). The dashboard UI displays a permanent red banner:

OAuth authentication failed. Check the OpenCodex account status and retry.

Calling POST /api/oauth/login/cancel does not clear this error once done: true, because cancelLoginFlow only aborts pending controllers and does not delete finalized error state. The false error state persists until the process is restarted.

Reproduction
  1. Have an existing, valid google-antigravity account configured in OpenCodex.
  2. Trigger an OAuth login flow via POST /api/oauth/login with provider: "google-antigravity", then let it time out, close the browser without completing, or trigger an authentication abort.
  3. Observe loginState.get("google-antigravity") transitions to done: true with error OAuth authentication failed....
  4. Inspect GET /api/oauth/status?provider=google-antigravity:
{
  "loggedIn": true,
  "email": "u***[email protected]",
  "source": "oauth",
  "error": "OAuth authentication failed. Check the OpenCodex account status and retry.",
  "done": true,
  "activeAccountId": "262a52071b361e634800e5d9a5f988e6",
  "accounts": [...]
}
  1. Try clearing via POST /api/oauth/login/cancel with {"provider": "google-antigravity"}: returns {"ok": true, "cancelled": false}, but error remains present in status.
  2. Requests to /v1/chat/completions succeed normally because credential routing uses the valid credential in auth.json, but the dashboard continuously reports an OAuth failure.
Version

2.83.0 (commit 33b321853aff76045617824793cc7cbc1d4084e7)

Operating system

Ubuntu 26.04 LTS (Linux x86_64)

Provider and model

google-antigravity

Logs or error output
# Response from GET /api/oauth/status?provider=google-antigravity
HTTP/1.1 200 OK
Content-Type: application/json

{
  "loggedIn": true,
  "email": "u***[email protected]",
  "source": "oauth",
  "error": "OAuth authentication failed. Check the OpenCodex account status and retry.",
  "done": true,
  "activeAccountId": "262a52071b361e634800e5d9a5f988e6",
  "accounts": [
    {
      "id": "262a52071b361e634800e5d9a5f988e6",
      "email": "u***[email protected]",
      "active": true,
      "expiresAt": 1792413768002,
      "plan": null
    }
  ]
}
Checks
  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.
Dominant language
TypeScript
Stars
16.9k
Forks
1.3k
Avg merge
7h 38m
Merged PRs (30d)
659

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lidge-jun/opencodex

All issues in lidge-jun/opencodex

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.