1

I have implemented custom auth using phone number only using AWS amplify. The issue that i am facing is, after entering mobile number from user, otp is sent to mobile number. Now, after taking otp as user input we pass the entered otp into await Amplify.Auth.confirmSignIn(confirmationValue: otpNumber,), the issue that I am facing is, if by mistake user inputs a wrong otp, the whole session is closed and after that if i call the same method with right otp it does not work. I have to again create the new session by calling Auth.signIn so a new otp is generated and then if user enter the new otp and verifies than it is succeeded. Can somebody suggest a solution for re-verification of otp without creating a new session.

Mit
  • 318
  • 2
  • 10

0 Answers0