1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 07:43:35 +00:00

support user encryption key

This commit is contained in:
Kyle Spearrin
2017-06-02 00:10:29 -04:00
parent e282966d64
commit 16098a1743
13 changed files with 218 additions and 104 deletions

View File

@@ -24,12 +24,9 @@
cryptoService.setKey(key, function () {
cryptoService.setKeyHash(hashedPassword, function () {
userService.setUserIdAndEmail(tokenService.getUserId(), tokenService.getEmail(), function () {
if (!response.privateKey) {
loggedIn(deferred);
return;
}
cryptoService.setEncPrivateKey(response.privateKey).then(function () {
cryptoService.setEncKey(response.key).then(function () {
return cryptoService.setEncPrivateKey(response.privateKey);
}).then(function () {
loggedIn(deferred);
});
});