refactor: single-window IDC auth with JSON API and token selection fixes#19
Merged
tickernelz merged 6 commits intotickernelz:masterfrom Feb 3, 2026
Merged
Conversation
…n handling and sync - Remove modelId/tools from CodeWhisperer request shape for alignment - Base region handling on profileArn with regex extraction - Improve sync operations and refresh token handling - Add account cleanup and profileArn from state - Enhance request error logging - Inject fetch into provider options - Add IDC region handling module Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
49c12c3 to
e04fdca
Compare
Owner
|
did you already test in on your local? both of your PR |
Contributor
Author
|
Yes - I tested both PRs locally.
I opened thses PRs to share the working solution, there's also an OpenCode Kiro Integration PR - people report issues (I find it likely that those are the ones I faced), this PR addresses many critical ones I just found an edge case and just committed the fix |
129e002 to
cdd6b9f
Compare
cdd6b9f to
4916106
Compare
Owner
|
okay then i trust you, i will merge both of your PR, hope this will fixed lot of bugs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
@awsapps.localaccounts from Kiro CLI sync (and stale tokens) could be selected, leading to 403 AccessDeniedException ("bearer token is invalid").auth.loaderreturned an emptyapiKey.What Changed (User-facing)
What Changed (Implementation)
GET /serves a combined page for Start URL + Region + Begin + code + status polling (src/plugin/auth-page.ts).GET /beginreturns JSON{ verificationUrl, verificationUriComplete, userCode, region }and triggers server-side token polling (src/plugin/server.ts)./statusincludesmessagealiasingerror;/error?message=...is parsed and rendered correctly.origin + /startand can follow redirects to canonical*.awsapps.comportal hosts (src/kiro/oauth-idc.ts).src/plugin/config/schema.ts).src/plugin/server.ts).src/plugin/accounts.ts).src/core/auth/auth-handler.ts,src/core/auth/idc-auth-method.ts).src/plugin/sync/kiro-cli.ts).auth.loaderreturnsapiKeyderived from stored auth so OpenCode UI can display connected (src/plugin.ts).maxsupport (src/core/request/thinking.ts,src/core/request/request-handler.ts,README.md).Tests
npm testnpm run typecheckNotable Behavior Changes / Risks
/beginis now JSON (breaking for any consumers relying on it as an HTML navigation endpoint).