aws sso login: allow to customize ip address for redirect_uri
- Dominant language
- Python
- Stars
- 17.3k
- Forks
- 4.6k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 13
Description
### Describe the feature
Recently `aws sso login` started using Authorization Code flow vs previously default device auth flow. As part of that flow CLI shows a URL which embeds a `redirect_uri` which redirects back to `127.0.0.1` after flow is successfully completed on the AWS side. For example:
```sh
➜ aws sso login
Attempting to automatically open the SSO authorization page in your default browser.
If the browser does not open or you wish to use a different device to authorize this request, open the following URL:
https://oidc.us-east-1.amazonaws.com/authorize?response_type=code&client_id=SECRET&redirect_uri=http%3A%2F%2F127.0.0.1%3A34535%2Foauth%2Fcallback&state=TRUNCATED
```
This works great if you are running the command locally on the machine. However sometimes its useful to run it on a remote machine where `127.0.0.1` does not work for the `redirect_uri`.
### Use Case
Running `aws sso login` on a remote machine where `127.0.0.1` is not accessible for the `redirect_uri`
### Proposed Solution
The request is to allow to customize the host of the `redirect_uri` which will allow to use the Authorization Code flow from a remote connection:
```sh
➜ aws sso login --redirect-host=
```
### Other Information
As a workaround currently its possible to switch to use the device auth flow:
```sh
➜ aws sso login --use-device-code
```
although the new authorization flow is a lot more slick as it requires much fewer clicks on the browser.
### Acknowledgements
- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### CLI version used
2.22.15
### Environment details (OS name and version, etc.)
aws-cli/2.22.15 Python/3.12.6 Linux/6.10.8-arch1-1 exe/x86_64.arch
Contributor guide
Assessment
This issue has not been assessed yet.