Skip to content

Sign in with AWS IAM Identity Center redirects to localhost:3128 instead of production callback URL #7727

Description

@chleiva

Before opening, please confirm:

Operating System

N/A (Web browser — issue occurs in the Kiro web sign-in page, not the desktop IDE)

Kiro Version

N/A (Web sign-in — not the desktop IDE)

Bug Description

When attempting to sign in to the Kiro web application (https://app.kiro.dev/signin) using the "Sign in with AWS IAM Identity Center" option, clicking the CONTINUE button causes the browser to be redirected to http://localhost:3128/signin/callback?login_option=awsidc&issuer_url= — a localhost address — instead of the correct production callback URL.

This completely blocks sign-in for all users attempting to use AWS IAM Identity Center authentication. The browser immediately fails with:

ERR_CONNECTION_REFUSED
This site can't be reached — localhost refused to connect.

The root cause appears to be a hardcoded localhost:3128 callback URL that was left in the production environment from a local development configuration. The OAuth/OIDC redirect URI for the AWS IAM Identity Center flow is pointing to the developer's local machine instead of the live production server.

Steps to Reproduce

  1. Open a web browser and navigate to https://app.kiro.dev/signin
  2. On the sign-in page, locate the "Sign in with AWS IAM Identity Center" section, which displays a "Start URL" input field with the note: "Provided by an admin or help desk."
  3. Enter a Start URL (e.g., your organization's AWS IAM Identity Center start URL).
  4. Click the CONTINUE button.
  5. Observe the browser redirect URL — it will redirect to http://localhost:3128/signin/callback?login_option=awsidc&issuer_url=
  6. The browser immediately shows: ERR_CONNECTION_REFUSED — This site can't be reached. localhost refused to connect.

Expected Behavior

After clicking CONTINUE, the browser should redirect to the correct production OAuth/OIDC callback URL on app.kiro.dev (e.g., https://app.kiro.dev/signin/callback?login_option=awsidc&issuer_url=...), initiate the AWS IAM Identity Center authentication flow, and ultimately sign the user in successfully.

Under no circumstances should the redirect target a localhost address in a production environment.

Conversation ID

No response

Additional Context

Erroneous redirect URL observed:

http://localhost:3128/signin/callback?login_option=awsidc&issuer_url=

Expected redirect URL (production):

https://app.kiro.dev/signin/callback?login_option=awsidc&issuer_url=<start_url>

Impact: This is a critical / P0 blocker — it completely prevents any user from signing in via AWS IAM Identity Center on the production web app. The hardcoded localhost:3128 is almost certainly a developer proxy port left in the production build configuration (e.g., in an environment variable, OAuth client registration, or frontend config file).

Suggested fix: Ensure the OAuth redirect URI / callback base URL is read from an environment variable or deployment configuration, and that the production deployment uses https://app.kiro.dev as the base URL rather than http://localhost:3128.

Metadata

Metadata

Assignees

No one assigned

    Labels

    pending-responsePending community response for next steps

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions