-
Notifications
You must be signed in to change notification settings - Fork 574
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
base: master
Are you sure you want to change the base?
Conversation
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]>
repeat := prompter.Password("Re-enter password") | ||
if repeat != password { | ||
log.Println("Confirmed password does not match") | ||
os.Exit(1) | ||
} |
There was a problem hiding this comment.
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? 💭
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") | |
} |
There was a problem hiding this comment.
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
repeat := prompter.Password("Re-enter password") | |
if repeat != password { | |
log.Println("Confirmed password does not match") | |
os.Exit(1) | |
} |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this 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!
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