Repository navigation
kiro 0.1.21: choose direct AWS sign-in for remote Magpie - #507
Merged
yetone merged 1 commit intoOct 30, 2026
Merged
Conversation
Contributor
|
Thanks @SemonCat! Merged as 498358c and published as Reviewed line by line at 236db71.
These ran against a mocked AWS. A real Builder ID or Identity Center sign-in wasn't tried on our side, so a report from a real org account is welcome. |
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.
When Magpie runs on a remote server or in Docker, choosing Builder ID or IAM Identity Center on Kiro's portal redirects the browser to localhost before the account login page appears. The original flow needs two pasted callback URLs and leaves users at an unreachable page immediately after selecting a provider.
This adds a sign-in selector to the plugin:
Direct AWS login skips the first loopback callback, leaving one final callback URL to paste into remote Magpie. Local browsers retain automatic completion. This uses authorization code + PKCE, with the existing scopes; it does not introduce device authorization or a public callback relay.
The shared callback handler also validates stage-specific state/path, reuses the existing AWS authorization URL for repeated portal callbacks, exchanges each accepted code at most once, and releases a superseded login's listener. Stale or unrelated callbacks do not cancel the current login. Package version: 0.1.20 → 0.1.21.
Validation
bun test packages/kiro— 110 passed, 0 failed, including remote callback transport emulation, direct Builder ID and organization login, PKCE, invalid inputs, stale state, duplicate callbacks and superseded login cases.bun scripts/check.mjs kiro,node --check packages/kiro/index.mjs,git diff --check: passed.Tests use synthetic codes, states and tokens. No account credentials, organization-specific Start URL or live authorization URLs are included in the patch.