lint fixes
This commit is contained in:
parent
be1cc945a2
commit
29cbe48eb5
|
@ -98,8 +98,8 @@ angular
|
|||
}
|
||||
|
||||
$scope.twoFactor = function (token) {
|
||||
if ($scope.twoFactorProvider === constants.twoFactorProvider.email
|
||||
|| $scope.twoFactorProvider === constants.twoFactorProvider.authenticator) {
|
||||
if ($scope.twoFactorProvider === constants.twoFactorProvider.email ||
|
||||
$scope.twoFactorProvider === constants.twoFactorProvider.authenticator) {
|
||||
token = token.replace(' ', '');
|
||||
}
|
||||
|
||||
|
@ -164,8 +164,9 @@ angular
|
|||
}
|
||||
|
||||
function init() {
|
||||
var params;
|
||||
if ($scope.twoFactorProvider === constants.twoFactorProvider.duo) {
|
||||
var params = $scope.twoFactorProviders[constants.twoFactorProvider.duo];
|
||||
params = $scope.twoFactorProviders[constants.twoFactorProvider.duo];
|
||||
|
||||
$window.Duo.init({
|
||||
host: params.Host,
|
||||
|
@ -177,13 +178,13 @@ angular
|
|||
});
|
||||
}
|
||||
else if ($scope.twoFactorProvider === constants.twoFactorProvider.u2f) {
|
||||
var params = $scope.twoFactorProviders[constants.twoFactorProvider.u2f];
|
||||
params = $scope.twoFactorProviders[constants.twoFactorProvider.u2f];
|
||||
var challenges = JSON.parse(params.Challenges);
|
||||
|
||||
initU2f(challenges);
|
||||
}
|
||||
else if ($scope.twoFactorProvider === constants.twoFactorProvider.email) {
|
||||
var params = $scope.twoFactorProviders[constants.twoFactorProvider.email];
|
||||
params = $scope.twoFactorProviders[constants.twoFactorProvider.email];
|
||||
$scope.twoFactorEmail = params.Email;
|
||||
if (Object.keys($scope.twoFactorProviders).length > 1) {
|
||||
$scope.sendEmail(false);
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
$scope.submitPromise =
|
||||
authService.getUserProfile().then(function (profile) {
|
||||
apiService.accounts.putSecurityStamp(request, function () {
|
||||
return apiService.accounts.putSecurityStamp(request, function () {
|
||||
$uibModalInstance.dismiss('cancel');
|
||||
authService.logOut();
|
||||
tokenService.clearTwoFactorToken(profile.email);
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
$analytics.eventTrack('settingsTwoStepAuthenticatorController', { category: 'Modal' });
|
||||
var _issuer = 'bitwarden',
|
||||
_profile = null,
|
||||
_masterPasswordHash
|
||||
_key = null;
|
||||
_masterPasswordHash,
|
||||
_key = null;
|
||||
|
||||
$scope.auth = function (model) {
|
||||
_masterPasswordHash = cryptoService.hashPassword(model.masterPassword);
|
||||
|
|
|
@ -56,11 +56,10 @@
|
|||
};
|
||||
|
||||
$scope.viewRecover = function () {
|
||||
|
||||
var modal = $uibModal.open({
|
||||
animation: true,
|
||||
templateUrl: 'app/settings/views/settingsTwoStepRecover.html',
|
||||
controller: 'settingsTwoStepRecoverController'
|
||||
});
|
||||
}
|
||||
};
|
||||
});
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
toastr.error('Failed to disable.');
|
||||
$scope.disableLoading = false;
|
||||
}).$promise;
|
||||
}
|
||||
};
|
||||
|
||||
function processResult(response) {
|
||||
$scope.enabled = response.Enabled;
|
||||
|
|
Loading…
Reference in New Issue