From 5e5e3b535924258d914cc52fa72774bc949081c9 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Sat, 25 Mar 2017 11:03:11 -0400 Subject: [PATCH] set profile after auth logIn --- src/app/services/authService.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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);