No message shown when SMS rate limiting applies
Expected behavior
When logging in via SMS-based two-factor authentication (2FA), the app should display a message to the user if it unable to send the SMS code (e.g. due to rate-limiting of one message per minute).
Actual behavior
When the app is unable to send an SMS code, it doesn't notify the user. Instead, the message simply doesn't arrive and this leads to potential user confusion.
Steps to reproduce the behavior
- Locate a WP.com account with SMS-based 2FA
- The following steps should be done in quick succession (within 60 seconds): a. Perform an action that requires an SMS code to be used (e.g. change the account password on WordPress.com via the browser) b. Log in to the WPAndroid app and notice the app indicates that a message has been sent
- Notice that no SMS is received
- (Optional) Wait till 60 seconds after Step 2a was performed and try again: notice that the SMS arrives correctly
Desired solution
It would be nice to show a message similar to WP.com, which displays "SMS codes are limited to once per minute. Please wait and try again". This was discussed in https://github.com/wordpress-mobile/WordPress-Android/issues/15961#issuecomment-1046830033.
Tested on Samsung S10, Android 11, WPAndroid 19.2
I ran into this review of the 22.9 beta and it could be related, but it's not clear yet what the problem is:
authenticator not recognize, text code not responding ,cant login please fix
The "text code not responding" sounds like it could be the SMS not arriving, which matches this issue.