ac4af582301a4e8a29245dbba767eba31334ddf9
1
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
e90a635a9a |
provider: a Codex account held in another Codex folder offers Sign in again when its refresh is refused (charliepu)
charliepu on Discord (#general 1566029465107173518, Windows): a ChatGPT account whose sign-in had lapsed had no button to sign in again in the Providers editor. The account was one Codex keeps in another of its folders (CODEX_HOME=C:\Users\...\.codex-db-backup-...). OpenAI refused its refresh, but renewSaved only wrapped the refusal in "run CODEX_HOME=... codex login", and codexSignInRead skipped marking it: a saved account's refused refresh is marked by savedRefreshFailed, which never runs for a folder-held one. So the row never got a lapse, and the GUI's Sign in again (renderAccounts' signedOut, SIGN_IN_GONE) never showed. - logins_on.go: renewSaved wraps such a refusal as codexHeldRefusal and names no command to run. - login_usage.go: codexSignInRead marks a codexHeldRefusal signed out (markRevoked), as it does Codex's own, so the row reads "Sign-in required" with Sign in again, which runs magpie's Codex sign-in for that user (startSignIn), the flow every other revoked Codex account uses. - signin.go: addLogin writes the new tokens back to the Codex folder that holds the account (codexHeldFolder, saveCodexLogin) and clears its gone mark, or the next look would read the dead tokens back over them. ~/.codex/auth.json is not touched. - account.go: codexRefresh's failure says "sign in to this account again", not "run codex login". - chatgpt_api.go (sibling): a ChatGPT API account's kept lapse is listed on its row too, so it gets the same Sign in again. No GUI change: the row already shows Sign in again for a Codex lapse (revoked-signin-account.test.cjs covers it); the backend never set one. Run at origin/main |