1
0
mirror of https://github.com/bitwarden/web synced 2025-12-15 15:53:18 +00:00

duo 2fa config and login with web sdk

This commit is contained in:
Kyle Spearrin
2017-06-21 15:17:44 -04:00
parent 2f3035a08f
commit ca9a0b072e
14 changed files with 262 additions and 12 deletions

View File

@@ -57,6 +57,7 @@ angular
$state.go('frontend.login.twoFactor', { returnState: returnState }).then(function () {
$timeout(function () {
$("#code").focus();
init();
});
});
}
@@ -90,6 +91,7 @@ angular
$scope.twoFactorProvider = provider;
$timeout(function () {
$("#code").focus();
init();
});
});
};
@@ -102,4 +104,19 @@ angular
$state.go('backend.user.vault');
}
}
function init() {
if ($scope.twoFactorProvider === constants.twoFactorProvider.duo) {
var params = $scope.twoFactorProviders[constants.twoFactorProvider.duo];
Duo.init({
host: params.Host,
sig_request: params.Signature,
submit_callback: function (theForm) {
var response = $(theForm).find('input[name="sig_response"]').val();
$scope.twoFactor(response);
}
});
}
}
});