How to handle different types of error responses in AWS Amplify Authentication

How to handle different types of error responses in AWS Amplify Authentication

aws amplify authentication



1. SignUp

UsernameExistsException - This exception returns if a user name is already taken.

2. ConfirmSignUp

ExpiredCodeException - This exception returns if a code has expired.
NotAuthorizedException - when a user isn't authorized.
CodeMismatchException - This exception returns if the code doesn't match.

3. ResendConfirmationCode

CodeDeliveryDetails- This exception returns if a disabled user or a user that doesn't exist. Amazon Cognito sends a confirmation code to the existing user's email or phone number.

4. ConfirmForgotPassword

CodeMismatchException - This exception returns if the code doesn't match.
ExpiredCodeException - This exception returns if a code has expired.

5. ForgotPassword

CodeDeliveryDetails- This exception returns if a disabled user or a user that doesn't exist. Amazon Cognito sends a confirmation code to the existing user's email or phone number.

Post a Comment

0 Comments