1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-10-31 08:20:37 +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.setToken(response.access_token);
tokenService.setRefreshToken(response.refresh_token); tokenService.setRefreshToken(response.refresh_token);
cryptoService.setKey(key); cryptoService.setKey(key);
if (response.EncryptedPrivateKey) { if (response.PrivateKey) {
cryptoService.setPrivateKey(response.EncryptedPrivateKey, key); cryptoService.setPrivateKey(response.PrivateKey, key);
} }
deferred.resolve();
_service.setUserProfile().then(function () {
deferred.resolve();
});
}, function (error) { }, function (error) {
if (error.status === 400 && error.data.TwoFactorProviders && error.data.TwoFactorProviders.length) { if (error.status === 400 && error.data.TwoFactorProviders && error.data.TwoFactorProviders.length) {
deferred.resolve(error.data.TwoFactorProviders); deferred.resolve(error.data.TwoFactorProviders);