mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
[login] revoke superseded auth tokens on relogin (#21747)
## Summary - revoke previously stored managed ChatGPT tokens after a successful re-login - keep the new login successful even when revocation is unavailable or fails - cover the shared persistence path used by browser and device-code login flows ## Why A new `codex login` currently overwrites existing managed ChatGPT credentials without attempting to revoke the superseded tokens, leaving old credentials valid longer than necessary. ## Validation - `just fmt` - `CARGO_HOME=/tmp/cargo-home cargo test -p codex-login` ## Notes - Initial local Cargo validation hit a corrupt existing crate cache in the default `CARGO_HOME`; rerunning with a clean temporary `CARGO_HOME` passed. --------- Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
1 parent
e3f481da98
commit
54ec99cb54
4 files changed
+253
-32
No files matched your search
@@ -11,3 +11,5 @@ mod revoke;
|
||||
pub use error::RefreshTokenFailedError;
|
||||
pub use error::RefreshTokenFailedReason;
|
||||
pub use manager::*;
|
||||
pub(crate) use revoke::revoke_auth_tokens;
|
||||
pub(crate) use revoke::should_revoke_auth_tokens;
|
||||
Reference in new issue
Block a user