1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 08:43:33 +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

@@ -12,11 +12,12 @@
$scope.deviceError = false;
$scope.auth = function (model) {
_masterPasswordHash = cryptoService.hashPassword(model.masterPassword);
$scope.authPromise = apiService.twoFactor.getU2f({}, {
masterPasswordHash: _masterPasswordHash
}).$promise.then(function (response) {
$scope.authPromise = cryptoService.hashPassword(model.masterPassword).then(function (hash) {
_masterPasswordHash = hash;
return apiService.twoFactor.getU2f({}, {
masterPasswordHash: _masterPasswordHash
}).$promise;
}).then(function (response) {
$scope.enabled = response.Enabled;
$scope.challenge = response.Challenge;
$scope.authed = true;