Skip to content

Commit

Permalink
Handle API response for mobile OTP, incorrect.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicbell committed Nov 4, 2020
1 parent 5a16123 commit f1e195e
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,9 @@ public boolean isMultifactorTokenInvalid() {

/// When MFA code sent is invalid or expired
public boolean isMultifactorCodeInvalid() {
return "a0.mfa_invalid_code".equals(code) || "invalid_grant".equals(code) && "Invalid otp_code.".equals(description);
return "a0.mfa_invalid_code".equals(code)
|| "invalid_grant".equals(code) && "Invalid otp_code.".equals(description)
|| "invalid_grant".equals(code) && "Wrong phone number or verification code.".equals(description);
}

/// When password used for SignUp does not match connection's strength requirements.
Expand Down Expand Up @@ -238,4 +240,4 @@ public boolean isLoginRequired() {
return "login_required".equals(code);
}

}
}

0 comments on commit f1e195e

Please sign in to comment.