Detect when 2FA is needed and error nicely

Fixes #507
This commit is contained in:
addshore 2017-05-13 11:57:16 +02:00
parent 516a5839a3
commit e8bbbe78d8
3 changed files with 11 additions and 2 deletions

View file

@ -119,6 +119,8 @@ public class LoginActivity extends AccountAuthenticatorActivity {
} else if (result.toLowerCase().contains("userblocked".toLowerCase())) {
// Matches login-userblocked
response = R.string.login_failed_blocked;
} else if (result.equals("2FA")){
response = R.string.login_failed_2fa_not_supported;
} else {
// Occurs with unhandled login failure codes
Timber.d("Login failed with reason: %s", result);