diff --git a/src/app/services/authService.js b/src/app/services/authService.js index 55a29f09a3..e9f2216cb6 100644 --- a/src/app/services/authService.js +++ b/src/app/services/authService.js @@ -33,10 +33,13 @@ angular tokenService.setToken(response.access_token); tokenService.setRefreshToken(response.refresh_token); cryptoService.setKey(key); - if (response.EncryptedPrivateKey) { - cryptoService.setPrivateKey(response.EncryptedPrivateKey, key); + if (response.PrivateKey) { + cryptoService.setPrivateKey(response.PrivateKey, key); } - deferred.resolve(); + + _service.setUserProfile().then(function () { + deferred.resolve(); + }); }, function (error) { if (error.status === 400 && error.data.TwoFactorProviders && error.data.TwoFactorProviders.length) { deferred.resolve(error.data.TwoFactorProviders);