mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-14 14:17:11 +00:00
fix(kiro): harden idc and callback auth paths
- keep headless paste routing aligned with the selected Kiro auth method - validate local callback replay targets and add prompt cancellation safeguards - wire IDC params through the dashboard start route and support equals-form CLI flags
This commit is contained in:
1 parent
bb7dbd108d
commit
f40d435a92
8 files changed
+431
-81
No files matched your search
@@ -76,6 +76,20 @@ describe('requestPasteCallbackStart', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('usesKiroLocalCallbackReplay', () => {
|
||||
it('limits local callback replay to CLI auth-code flows', async () => {
|
||||
const { usesKiroLocalCallbackReplay } = await import(
|
||||
`../../../src/cliproxy/auth/oauth-handler?kiro-local-callback-mode=${Date.now()}`
|
||||
);
|
||||
|
||||
expect(usesKiroLocalCallbackReplay('aws-authcode', 'authcode')).toBe(true);
|
||||
expect(usesKiroLocalCallbackReplay('idc', 'authcode')).toBe(true);
|
||||
expect(usesKiroLocalCallbackReplay('idc', 'device')).toBe(false);
|
||||
expect(usesKiroLocalCallbackReplay('google', 'authcode')).toBe(false);
|
||||
expect(usesKiroLocalCallbackReplay('aws', 'authcode')).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe('resolvePasteCallbackAuthUrl', () => {
|
||||
it('returns the immediate auth URL without polling', async () => {
|
||||
const { resolvePasteCallbackAuthUrl } = await import(
|
||||
|
||||
Reference in new issue
Block a user