Transient OAuth login failure persists in getLoginStatus and masks active account in dashboard
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
- Domain
- authentication, backend-api-design
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
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
- Have an existing, valid
google-antigravityaccount configured in OpenCodex. - Trigger an OAuth login flow via
POST /api/oauth/loginwithprovider: "google-antigravity", then let it time out, close the browser without completing, or trigger an authentication abort. - Observe
loginState.get("google-antigravity")transitions todone: truewith errorOAuth authentication failed.... - 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": [...]
}
- Try clearing via
POST /api/oauth/login/cancelwith{"provider": "google-antigravity"}: returns{"ok": true, "cancelled": false}, buterrorremains present in status. - Requests to
/v1/chat/completionssucceed normally because credential routing uses the valid credential inauth.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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from lidge-jun/opencodex
-
account-pool bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
lidge-jun/opencodex#7440 · 2 comments ·
Maintainers usually reply within 1 day
-
[Docs]: translate the #7395 OpenGateway and Mistral provider-guide sectionsPossibly taken @MannXo claimed this today. Opendocumentation
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
lidge-jun/opencodex#7405 · 3 comments ·
Maintainers usually reply within 1 day
-
bug cli
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
lidge-jun/opencodex#7403 · 2 comments ·
Maintainers usually reply within 1 day
-
account-pool enhancement needs-design proxy
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
lidge-jun/opencodex#6737 · 1 comment ·
Maintainers usually reply within 1 day
-
enhancement proxy
Difficulty 4/5 1-2 days Newbie friendliness 55/100
lidge-jun/opencodex#7443 · 3 comments ·
Maintainers usually reply within 1 day
All issues in lidge-jun/opencodex
Similar issues
-
area: app type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ExpidetGames/code-reviewer#585 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 83/100
module-federation/core#5205 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
LanternOps/breeze#9392 · 1 comment ·
Maintainers usually reply within 1 day
-
engine-rs P3 review-deferral wasm
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
maniator/verticopolis#1154 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day