Reputation: 1540
I added Firebase Phone Authenticate to my mobile app. Standard flow:
Sometimes the user has broken flow (SMS does not come along):
In the second scenario, the user could avoid a problem if after click user get the same verification code. Has Firebase certain settings? (although this somewhat reduces the security of authorization over the phone). With the javascript API, is there a way to 'resend' the same verification code?
Upvotes: 0
Views: 1757
Reputation: 30848
You can try adding a timer after they click to send the SMS code which would wait for some time (15seconds) before allowing the user to resent the code. FirebaseUI uses that mechanism to take into account SMS delays.
On the other hand, this shouldn't be a problem, Firebase Auth will resend the same code for the same session within a short period of time apart. So if the user enters an older code (code from successive attempts), it will still work.
Upvotes: 2