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

<amplify-authenticator> password weakness warning is unclear #2416

Closed
holtc opened this issue Dec 26, 2018 · 6 comments
Closed

<amplify-authenticator> password weakness warning is unclear #2416

holtc opened this issue Dec 26, 2018 · 6 comments
Labels
Angular Related to Angular 2+ Auth Related to Auth components/category feature-request Request a new feature UI Related to UI Components

Comments

@holtc
Copy link

holtc commented Dec 26, 2018

Is your feature request related to a problem? Please describe.
When a user is creating an account and enters a password that is too short, an unclear error message is shown in certain cases. Say the minimum length you have set in Cognito is 8 characters. If a users tries to create an account with fewer than 6 characters, the error message shown is something like:

1 validation error detected: Value at 'password' failed to satisfy constraint: Member must have length greater than or equal to 6

However, if the password entered by the user is 6 or more characters, but shorter than the minimum length set in Cognito, something like the following error message shows up:

Password did not conform with policy: Password not long enough

Describe the solution you'd like
This is misleading, it would be great to have something similar to the first error message for all cases where the password is not long enough. I checked, and this is not available in the response sent by Cognito, so perhaps it could be added as a field in the signUpConfig.

Describe alternatives you've considered
The only alternative I can think of is to build my own UI component.

Additional context
The prebuilt component is awesome, so I'd love to keep using it!

@haverchuck haverchuck added feature-request Request a new feature Angular Related to Angular 2+ labels Dec 26, 2018
@haverchuck
Copy link
Contributor

@holtc - I think configurable error messages are a good idea. However, I think this shouldn't be done in a one-off fashion. We should implement a generic way of configuring ANY of the error messages.

@lsirivong
Copy link

Confirming that we see this too. The errors are pretty inconsistent and confusing. Here are some examples of what we see with cognito's default recommended constraints:

- Minimum length
8
Require numbers
Require special character
Require uppercase letters
Require lowercase letters

Attempting 1:

2 validation errors detected: Value at 'password' failed to satisfy constraint: Member must have length greater than or equal to 6; Value at 'password' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[\S]+.*[\S]+$

Attempting 12, 123, 1234, 12345:

1 validation error detected: Value at 'password' failed to satisfy constraint: Member must have length greater than or equal to 6

Attempting 123456 or 1234567

Password did not conform with policy: Password not long enough

Attempting 12345678

Password did not conform with policy: Password must have lowercase characters

@madmed88
Copy link
Contributor

It would be nice to display the password policies on the signUp page, and check them as the user is typing the password.

@jordanranz
Copy link
Contributor

FYI, we have started an RFC discussion for a proposed Amplify UI Component refactor to increase customizability and flexibility for our components. Please feel free to add any additional comments to the following issue:

#3279

@skworden
Copy link

skworden commented Feb 14, 2021

If the password is less than 6 chars it throws a InvalidParameterException.
If the password is greater than 6 and less than the user's defined length it throws InvalidPasswordException.
If the password is 1 char it throws a different messages.

Recap - 2 different error codes and three different error messages for password that is too short.

I think they should match.

@abdallahshaban557 abdallahshaban557 added the Auth Related to Auth components/category label Jun 3, 2022
@abdallahshaban557 abdallahshaban557 added the UI Related to UI Components label Jun 20, 2022
@cwomack
Copy link
Member

cwomack commented Mar 31, 2023

For anyone following this, apologies for the delayed follow up from our team. This issue was tied to a now deprecated package and shouldn't be a problem with the new Authenticator component.

I'll close this issue, but if there's similar problems experienced with the new Authenticator then please open an issue within the amplify-ui repo here.

@cwomack cwomack closed this as completed Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Angular Related to Angular 2+ Auth Related to Auth components/category feature-request Request a new feature UI Related to UI Components
Projects
None yet
Development

No branches or pull requests

8 participants