Skip to content

Allow SSO OAuth callback port override#10134

Open
ashenm wants to merge 1 commit intoaws:v2from
ashenm:feature/oauth-callback-server-port-override
Open

Allow SSO OAuth callback port override#10134
ashenm wants to merge 1 commit intoaws:v2from
ashenm:feature/oauth-callback-server-port-override

Conversation

@ashenm
Copy link

@ashenm ashenm commented Mar 15, 2026

Fixes #9148

This change adds support allowing OAuth callback address port override used by commands like aws sso login via environment variable AWS_OAUTH_CALLBACK_SERVER_PORT

The main use case is containerized and remote development environments, where the default localhost callback port may not be suitable or easily reachable. By allowing the port to be configured externally, the login flow becomes more flexible across Docker, dev containers, remote workspaces, and other non-standard local setups.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ashenm ashenm changed the title Allow OAuth callback port override Allow SSO OAuth callback port override Mar 15, 2026
@ashovlin
Copy link
Member

ashovlin commented Mar 16, 2026

Hey @ashenm, I'd prefer we start with an option like --redirect-port in #9148.

We try to ensure that AWS_ environment variables work across SDKs and tools, so if going with AWS_OAUTH_CALLBACK_SERVER_PORT we'd want to coordinate with at least the AWS Tools for PowerShell team, and update more documentation. Starting with just an AWS CLI option is simpler, and part of the generated documentation.

Will this approach work for your use case?

@ashovlin ashovlin self-assigned this Mar 16, 2026
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.

2 participants