Provider Auth cannot be restored when auth.json does not exist - Codex
Quick fix
Upgrading to v3.13.0 resolves Provider Auth failing to restore during multi-device sync when auth.json is missing.
Symptom
Section titled “Symptom”因为缺少 auth.json,已有的 provider auth 没有被用来恢复 live authBecause auth.json is missing, the existing provider auth was not used to restore the live auth
In a multi-device or WebDAV sync scenario, the local ~/.codex/auth.json on a new device often has not been generated yet. Older logic detecting that missing file concluded the auth information was lost and aborted the provider switch or live configuration sync, even though the Provider configuration already held a valid settings_config.auth. Issue #561 also notes that the SQLite and WebDAV caching means the auth.json content in the exported config file is often empty, further worsening the state inconsistency across devices. This was resolved by reworking the provider credential lifecycle and the live sync logic underneath.
Upgrade cc-switch to v3.13.0 or newer. The new version reads the existing auth from the Provider configuration and restores the local state automatically.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 2 real issues
- Why is auth.json often empty after syncing through WebDAV?
- That is mainly the SQLite caching not flushing the data in time on export, not a WebDAV transfer problem. v3.13.0 improved the sync and cache handling.
- Do I still have to create or edit auth.json by hand after upgrading?
- No. The fixed flow detects the missing local file and falls back to the settings_config.auth already in the Provider configuration to complete the restore.
Related problems
Section titled “Related problems”This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.