Files
OmniRoute/src/app
Diego Rodrigues de Sa e Souza ab01d74306 fix(codex): validate refresh_token on import before persisting (#7522) (#7525)
POST /api/oauth/codex/import accepted a payload with an already-invalidated
refresh_token and persisted it as an 'active' connection that could never
work — the failure surfaced confusingly only on first real use, long after
the import looked successful.

Validate each record's refresh_token against OpenAI's OAuth endpoint before
persisting, reusing refreshCodexToken() (free exchange, no quota). On an
unrecoverable refresh error the record is rejected with a clear re-auth
message; a valid token imports as before, with any rotated tokens applied.
Bulk import still processes each record independently — one dead token no
longer blocks the valid ones.

Reproduced live 2026-07-16: a 2026-07-10 auth.json imported clean but its
refresh_token returned 401 refresh_token_invalidated. TDD: 3 tests RED against
the old route, 5/5 GREEN with the fix.

Closes #7522
2026-07-17 02:39:11 -03:00
..
2026-03-09 15:12:51 -03:00
2026-03-09 15:12:51 -03:00
2026-03-09 15:12:51 -03:00
2026-03-09 15:12:51 -03:00
2026-03-09 15:12:51 -03:00
2026-03-09 15:12:51 -03:00
2026-03-09 15:12:51 -03:00
2026-03-09 15:12:51 -03:00
2026-06-20 14:55:24 -03:00
2026-07-13 09:12:40 -03:00
2026-06-19 06:49:01 -03:00
2026-05-10 00:55:06 -03:00
2026-06-19 06:49:01 -03:00
2026-06-19 06:49:01 -03:00
2026-06-19 06:49:01 -03:00
2026-06-19 06:49:01 -03:00
2026-06-19 06:49:01 -03:00
2026-06-19 06:49:01 -03:00
2026-07-02 10:47:13 -03:00
2026-06-26 02:51:06 -03:00
2026-07-04 13:00:30 -03:00
2026-05-24 18:05:58 -03:00