Skip to content

feat(auth): improve identity center login parameter handling #2059

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

djgoku
Copy link

@djgoku djgoku commented Jun 13, 2025

Description of changes:

Skip interactive prompts when identity provider URL and region are provided via command line arguments. Always save parameters to database for future use regardless of input method.

Current behavior:

q login --license pro --identity-provider https://<some-start-url>.awsapps.com/start --region us-east-2
✔ Enter Start URL · https://<some-start-url>.awsapps.com/start
✔ Enter Region · us-east-2
Device authorized

Logged in successfully

Behavior after changes:

% cargo run --bin cli -- login --license pro --identity-provider https://<some-start-url>.awsapps.com/start --region us-east-2
   Compiling cli v1.10.1 (/amazon-q-developer-cli/crates/cli)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 10.77s
     Running `target/debug/cli login --license pro --identity-provider 'https://<some-start-url>.awsapps.com/start' --region us-east-2`
Logged in

Skip interactive prompts when identity provider URL and region are
provided via command line arguments. Always save parameters to database
for future use regardless of input method.

Current behavior:
```
q login --license pro --identity-provider https://<some-start-url>.awsapps.com/start --region us-east-2
✔ Enter Start URL · https://<some-start-url>.awsapps.com/start
✔ Enter Region · us-east-2
Device authorized

Logged in successfully
```

Behavior after changes:

```
% cargo run --bin cli -- login --license pro --identity-provider https://<some-start-url>.awsapps.com/start --region us-east-2
   Compiling cli v1.10.1 (/amazon-q-developer-cli/crates/cli)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 10.77s
     Running `target/debug/cli login --license pro --identity-provider 'https://<some-start-url>.awsapps.com/start' --region us-east-2`
Logged in
```
@djgoku djgoku requested a review from a team as a code owner June 13, 2025 21:56
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