react to TwoFactorProviders
This commit is contained in:
parent
6c8f2d526c
commit
5a20f9de01
|
@ -1,6 +1,6 @@
|
||||||
function ApiService(tokenService, logoutCallback) {
|
function ApiService(tokenService, logoutCallback) {
|
||||||
this.baseUrl = 'http://localhost:4000';
|
//this.baseUrl = 'http://localhost:4000';
|
||||||
//this.baseUrl = 'https://api.bitwarden.com';
|
this.baseUrl = 'https://api.bitwarden.com';
|
||||||
this.tokenService = tokenService;
|
this.tokenService = tokenService;
|
||||||
this.logoutCallback = logoutCallback;
|
this.logoutCallback = logoutCallback;
|
||||||
|
|
||||||
|
@ -23,8 +23,8 @@ function initApiService() {
|
||||||
success(new IdentityTokenResponse(response));
|
success(new IdentityTokenResponse(response));
|
||||||
},
|
},
|
||||||
error: function (jqXHR, textStatus, errorThrown) {
|
error: function (jqXHR, textStatus, errorThrown) {
|
||||||
if (jqXHR.responseJSON && jqXHR.responseJSON.TwoFactorRequired &&
|
if (jqXHR.responseJSON && jqXHR.responseJSON.TwoFactorProviders &&
|
||||||
jqXHR.responseJSON.TwoFactorRequired === true) {
|
jqXHR.responseJSON.TwoFactorProviders.length) {
|
||||||
successWithTwoFactor();
|
successWithTwoFactor();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue