react to TwoFactorProviders

This commit is contained in:
Kyle Spearrin 2017-01-25 00:34:57 -05:00
parent 6c8f2d526c
commit 5a20f9de01
1 changed files with 4 additions and 4 deletions

View File

@ -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 {