Skip to content

fix: derive IdC OIDC region from device registration, not profile ARN - #126

Open
haxrob wants to merge 1 commit into
tickernelz:masterfrom
haxrob:fix/idc-oidc-region-from-device-registration
Open

fix: derive IdC OIDC region from device registration, not profile ARN#126
haxrob wants to merge 1 commit into
tickernelz:masterfrom
haxrob:fix/idc-oidc-region-from-device-registration

Conversation

@haxrob

@haxrob haxrob commented Aug 25, 2026

Copy link
Copy Markdown

Fix for token refresh issue for when the Q profile and Identity Center are in different regions. Here the refresh reaches a regional endpoint that never issued the device registration and fails with HTTP 400 Invalid token provided. As such, tokens last an hour, so sessions start fine and break mid-session.

syncFromKiroCli sets oidcRegion = serviceRegion, where serviceRegion is derived from the Q Developer profile ARN. refreshAccessToken then POSTs the Identity Center refresh to https://oidc..amazonaws.com/token.

isValidRegion is used rather than normalizeRegion because the latter returns us-east-1 for unrecognised input, which would substitute a wrong region instead of falling back.

region still comes from the ARN, so the q..amazonaws.com inference endpoint is unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant