From 5a20f9de0150dc38ade1a9e5d1ccb60daea36eb7 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 25 Jan 2017 00:34:57 -0500 Subject: [PATCH] react to TwoFactorProviders --- src/services/apiService.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/services/apiService.js b/src/services/apiService.js index 0b19d33102..147809d1fe 100644 --- a/src/services/apiService.js +++ b/src/services/apiService.js @@ -1,6 +1,6 @@ function ApiService(tokenService, logoutCallback) { - this.baseUrl = 'http://localhost:4000'; - //this.baseUrl = 'https://api.bitwarden.com'; + //this.baseUrl = 'http://localhost:4000'; + this.baseUrl = 'https://api.bitwarden.com'; this.tokenService = tokenService; this.logoutCallback = logoutCallback; @@ -23,8 +23,8 @@ function initApiService() { success(new IdentityTokenResponse(response)); }, error: function (jqXHR, textStatus, errorThrown) { - if (jqXHR.responseJSON && jqXHR.responseJSON.TwoFactorRequired && - jqXHR.responseJSON.TwoFactorRequired === true) { + if (jqXHR.responseJSON && jqXHR.responseJSON.TwoFactorProviders && + jqXHR.responseJSON.TwoFactorProviders.length) { successWithTwoFactor(); } else {