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

Authenticator does not validate user entered password correctly #154

Closed
2 tasks done
pmellaaho opened this issue Jun 3, 2024 · 4 comments
Closed
2 tasks done

Authenticator does not validate user entered password correctly #154

pmellaaho opened this issue Jun 3, 2024 · 4 comments
Labels
authenticator This issue relates to the Authenticator component bug Something isn't working

Comments

@pmellaaho
Copy link

Before creating a new issue, please confirm:

Which UI component?

Authenticator

Gradle script dependencies

// Put output below this line
authenticatorVersion = "1.1.0"

Environment information

# Put output below this line
Gradle 8.6

Please include any relevant guides or documentation you're referencing

No response

Describe the bug

Authenticator validates the user entered password e.g. in SignUp screen and this seems to work correctly for other rules specified in amplifyconfiguration.json -file but not for missing upper case letter ("REQUIRES_UPPERCASE" -rule). When the password doesn't meet some other rule, the Authenticator show the correct error msg to user and no NW request is made. If the Upper case letter -rule is not followed the NW request is made and the correct validation result comes from backend and "Password did not conform with policy: Password must have uppercsase characters" -message is shown to the user.

Reproduction steps (if applicable)

No response

Code Snippet

// Put your code below this line.

Log output

// Put your logs below this line


amplifyconfiguration.json

                "passwordPolicyMinLength": 8,
                "passwordPolicyCharacters": [
                    "REQUIRES_LOWERCASE",
                    "REQUIRES_NUMBERS",
                    "REQUIRES_SYMBOLS",
                    "REQUIRES_UPPERCASE"
                ]
            },

Additional information and screenshots

No response

@github-actions github-actions bot added the pending-triage Issue is pending triage label Jun 3, 2024
@mattcreaser mattcreaser added bug Something isn't working authenticator This issue relates to the Authenticator component labels Jun 3, 2024
@github-actions github-actions bot removed the pending-triage Issue is pending triage label Jun 3, 2024
@mattcreaser
Copy link
Member

Thanks for the report. We'll look into the issue.

@mattcreaser
Copy link
Member

This is a parsing logic error of the configuration, specifically it's looking for the value REQUIRES_UPPER instead of the correct REQUIRES_UPPERCASE. I've verified that the logic to handle the uppercase/lowercase requirements (both are broken) work correctly if the configuration values are properly parsed.

This logic existed in Authenticator 1.1.0 but was moved over to the Amplify library in 1.2.0 - unfortunately the faulty logic was moved as-is. So the bug exists but it is now in the Amplify library instead of Authenticator (same result, though). I'll open a new issue and fix it there, and then use this issue to track the dependency update once the Amplify release is made.

@mattcreaser
Copy link
Member

This has been resolved in Authenticator 1.2.1

@github-actions github-actions bot removed the pending-release This issue has been fixed and will be included in a future release label Jun 7, 2024
Copy link
Contributor

github-actions bot commented Jun 7, 2024

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
authenticator This issue relates to the Authenticator component bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants