Files
OmniRoute/tests
Diego Rodrigues de Sa e Souza 2b24448bd6 fix(oauth): resolve Kiro AWS SSO cache client credentials by clientId match (port from 9router#1253) (#7122)
tryAwsSsoCache() only resolved clientId/clientSecret via data.clientIdHash -> <hash>.json. Newer kiro-auth-token.json files instead carry a top-level clientId directly, so that lookup silently failed and left clientId/clientSecret null, sending the dashboard's Import Token POST down the non-IDC path. That path (KiroService.validateImportToken -> readCachedClientCredentials) picked a client registration by region + latest-expiry across ALL cached SSO client registrations, ignoring the token's actual clientId — on a machine with multiple stale registrations this returned a mismatched clientId/clientSecret pair, producing 'Bad credentials' on refresh.

Fix: resolve clientId/clientSecret by scanning the cache for a registration file whose own clientId matches the token's clientId (falling back to clientIdHash first, then a direct-match scan), and thread an optional clientId hint into readCachedClientCredentials()/validateImportToken() so an exact match always wins over the region/latest-expiry heuristic.

Reported-by: Asher (@XCrag) (https://github.com/decolua/9router/issues/1253)
2026-07-17 10:39:29 -03:00
..
2026-05-23 01:46:59 -03:00
2026-07-13 09:12:40 -03:00
2026-07-02 10:47:13 -03:00
2026-06-19 06:49:01 -03:00
2026-07-06 02:25:17 -03:00
2026-07-13 09:12:40 -03:00
2026-07-13 09:12:40 -03:00
2026-06-13 17:27:40 -03:00