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.
Asked
Active
Viewed 261 times
1
-
Can you share your custom auth handler code? – Andrew Gillis Jul 27 '21 at 16:11
-
Facing the same issue. @Mit were you able to figure out the issue? – Parth Sharma Jun 28 '22 at 11:29