Skip to content
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

fix: 🐛 improve password confirmation prompt (fixes #1390) #1418

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

srizzling
Copy link
Contributor

@srizzling srizzling commented Mar 24, 2025

Prior to this change, the saml2aws configure command prompted users with "Confirm" after entering their password. This wording was ambiguous, leading many users to press "Enter" instead of re-entering their password, which resulted in an unclear error message stating "Passwords did not match." Since no second password was actually entered, the error message did not effectively communicate the issue, causing confusion.

After this change, the prompt explicitly asks users to "Enter password" and "Re-enter password" to confirm. Additionally, the error message has been updated to "Confirmed password does not match" for better clarity. The logic has also been refactored to reduce unnecessary nesting and improve readability.

This change enhances the user experience by making the password confirmation process more intuitive, preventing authentication failures due to unclear instructions.

fixes #1390

Prior to this change, the saml2aws configure command prompted users with
"Confirm" after entering their password. This wording was ambiguous,
leading many users to press "Enter" instead of re-entering their
password, which resulted in an unclear error message stating "Passwords
did not match." Since no second password was actually entered, the error
message did not effectively communicate the issue, causing confusion.

After this change, the prompt explicitly asks users to "Enter password"
and "Re-enter password" to confirm. Additionally, the error message has
been updated to "Confirmed password does not match" for better clarity.
The logic has also been refactored to reduce unnecessary nesting and
improve readability.

This change enhances the user experience by making the password
confirmation process more intuitive, preventing authentication failures
due to unclear instructions.

Signed-off-by: Sriram Venkatesh <[email protected]>
@srizzling srizzling changed the title fix: 🐛 improve password confirmation prompt (#1390) fix: 🐛 improve password confirmation prompt (fixes #1390) Mar 24, 2025
Comment on lines +57 to +61
repeat := prompter.Password("Re-enter password")
if repeat != password {
log.Println("Confirmed password does not match")
os.Exit(1)
}
Copy link
Contributor

@pwmcintyre pwmcintyre Mar 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a good idea? 💭

Suggested change
repeat := prompter.Password("Re-enter password")
if repeat != password {
log.Println("Confirmed password does not match")
os.Exit(1)
}
for {
if password == prompter.Password("Re-enter password") {
break
}
log.Println("Confirmed password does not match")
}

Copy link
Contributor

@pwmcintyre pwmcintyre Mar 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spicy opinion: password repeaters are annoying

Suggested change
repeat := prompter.Password("Re-enter password")
if repeat != password {
log.Println("Confirmed password does not match")
os.Exit(1)
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with repeat. For sign up: maybe? for logins: NO. let's delete?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its one time during configure operation.. so I guess if a user gets a password wrong.. we are just assuming they will just do it again.

Seems okay to me.

Copy link

@ary-b ary-b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for taking the time to look into this team, I really appreciate it 😄 I agree that the password repeater could be removed, but not a big deal if it stays with the enhanced prompts. Cheers everyone!

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.

Improve "saml2aws configure" CLI prompting
4 participants