Skip to content

Commit

Permalink
Fixed the condition.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruslan Baidan committed Nov 11, 2022
1 parent 1c51d68 commit 36f81c0
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/UserService.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,10 @@
function (data) {
self.authenticated = false;
self.token = null;
if (data.data.token == "2FARequired") {
promise.reject("2FARequired");
if (data.data.token === "2FARequired" || data.data.token === "2FACodeNotCorrect") {
promise.reject(data.data.token);
}
if (data.data.token == "twoFANotCorrect") {
promise.reject("twoFANotCorrect");
}
if (data.data.token == "2FAToBeConfigured") {
if (data.data.token === "2FAToBeConfigured") {
self.otpSecret = data.data.secret;
promise.reject("2FAToBeConfigured:"+data.data.qrcode);
}
Expand Down

0 comments on commit 36f81c0

Please sign in to comment.