I have implemented a change password feature and now I would like to test it. But I’m facing the limit of attempts. What should I do to prevent this error?
Attempt limit exceeded, please try after some time
I have implemented a change password feature and now I would like to test it. But I’m facing the limit of attempts. What should I do to prevent this error?
Attempt limit exceeded, please try after some time
I am on the Cognito team. This is not configurable. We do have protection mechanisms to prevent users from abusing forgot password APIs which is probably what you are witnessing.
this is not the exact answer e.g. attempts limit is not configurable for sure. but still, if you want to test multiple times, you can try different emails e.g. if attempts limits exceed for your Email1, you can start attempting with Email2. Also, note that you can receive the emails for Email1 and Email2 on a single email address e.g suppose your Email1= [email protected] you can register your Email2 [email protected] This way you can receive emails on [email protected] for both Email1 and Email2
Cognito allows 5 password reset
/sign-in
attempts.
After the allowed number is exceeded the service starts temporary lockouts with exponentially increasing times. Here you can find more details on how it happens: https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-authentication-flow.html
Users can attempt but fail to sign in correctly five times before Amazon Cognito temporarily locks them out. Lockout time starts at one second and increases exponentially, doubling after each subsequent failed attempt, up to about 15 minutes. Amazon Cognito ignores attempts to log in during a temporary lockout period, and these attempts don't initiate a new lockout period. After a user waits 15 minutes, Amazon Cognito resets the temporary lockout. This behavior is subject to change.
If resetting password using email , you can use something like guerrillamail to get many new temporary emails to work around the limitExceeded exception.
If resseting password using phone , try using a virtual phone number provider like google voice to get at least 2 phone-#'s to work around the limitExceeded exception.
The workaround I have used (while testing user confirmation flow) is: once the limit is reached, make sure to complete a correct flow to reset the exponential backoff , then delete account and continue testing after re-creating the account.
If you have access to the dashboard, you can try manually disabling / re-enabling the user. This worked for me.
© 2022 - 2024 — McMap. All rights reserved.