1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-27 12:36:14 +01:00

set profile after auth logIn

This commit is contained in:
Kyle Spearrin 2017-03-25 11:03:11 -04:00
parent 19203e976b
commit 5e5e3b5359

View File

@ -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);
}
_service.setUserProfile().then(function () {
deferred.resolve();
});
}, function (error) {
if (error.status === 400 && error.data.TwoFactorProviders && error.data.TwoFactorProviders.length) {
deferred.resolve(error.data.TwoFactorProviders);