1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 01:03:35 +00:00

move pbkdf2 to web crypto with shim fallback

This commit is contained in:
Kyle Spearrin
2017-07-08 23:41:02 -04:00
parent b62950fa2b
commit bc8892a237
21 changed files with 284 additions and 192 deletions

View File

@@ -5,18 +5,18 @@
authService, toastr, $analytics) {
$analytics.eventTrack('settingsDeleteController', { category: 'Modal' });
$scope.submit = function (model) {
var request = {
masterPasswordHash: cryptoService.hashPassword(model.masterPassword)
};
$scope.submitPromise = apiService.accounts.postDelete(request, function () {
$scope.submitPromise = cryptoService.hashPassword(model.masterPassword).then(function (hash) {
return apiService.accounts.postDelete({
masterPasswordHash: hash
}).$promise;
}).then(function () {
$uibModalInstance.dismiss('cancel');
authService.logOut();
$analytics.eventTrack('Deleted Account');
$state.go('frontend.login.info').then(function () {
toastr.success('Your account has been closed and all associated data has been deleted.', 'Account Deleted');
});
}).$promise;
return $state.go('frontend.login.info');
}).then(function () {
toastr.success('Your account has been closed and all associated data has been deleted.', 'Account Deleted');
});
};
$scope.close = function () {