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 should show better error message when code in typed incorrectly too many times on Password reset #180

Closed
2 tasks done
pmellaaho opened this issue Aug 21, 2024 · 4 comments
Labels
authenticator This issue relates to the Authenticator component bug Something isn't working pending-release This issue has been fixed and will be included in a future release

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.2.1"

Environment information

# Put output below this line
Gradle 8.7

Please include any relevant guides or documentation you're referencing

No response

Describe the bug

On reset password use case, if the user keeps inserting the code incorrectly the Authenticator will show "Code is incorrect" for the first five times (CodeMismatchException). After that the Authenticator is showing generic "Sorry, something went wrong" -message to the user. This happens because Authenticator does not have specific handling for LimitExceededException which is received after fifth attempt. Better error message to show would be e.g. “Too many attempts, try again later”

Reproduction steps (if applicable)

No response

Code Snippet

// Put your code below this line.

Log output

// Put your logs below this line
Encountered AuthException: LimitExceededException{message=Number of allowed operation has exceeded., cause=LimitExceededException(message=Attempt limit exceeded, please try after some time.), recoverySuggestion=Please wait a while before re-attempting or increase the service limit.}

amplifyconfiguration.json

No response

Additional information and screenshots

No response

@github-actions github-actions bot added pending-triage Issue is pending triage pending-maintainer-response Issue is pending response from an Amplify team member labels Aug 21, 2024
@mattcreaser
Copy link
Member

mattcreaser commented Aug 21, 2024

Thanks for posting this @pmellaaho. We should have specific handling for this scenario.

I also believe we should add general-purpose error message handling like there is on the Swift Authenticator where you can specify the string content for arbitrary exception types. I'll open that as a separate feature request.

@mattcreaser mattcreaser added bug Something isn't working authenticator This issue relates to the Authenticator component labels Aug 21, 2024
@github-actions github-actions bot removed pending-maintainer-response Issue is pending response from an Amplify team member pending-triage Issue is pending triage labels Aug 21, 2024
@mattcreaser
Copy link
Member

Please see feature request #181

@mattcreaser mattcreaser added the pending-release This issue has been fixed and will be included in a future release label Sep 11, 2024
@mattcreaser
Copy link
Member

This was release in Authenticator 1.3.0

Copy link
Contributor

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 pending-release This issue has been fixed and will be included in a future release
Projects
None yet
Development

No branches or pull requests

2 participants