mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-06 18:57:56 +01:00
added org duo to 2fa flow
This commit is contained in:
parent
551217ea38
commit
3643222b3c
@ -216,8 +216,9 @@ angular
|
|||||||
function init() {
|
function init() {
|
||||||
stopU2fCheck = true;
|
stopU2fCheck = true;
|
||||||
var params;
|
var params;
|
||||||
if ($scope.twoFactorProvider === constants.twoFactorProvider.duo) {
|
if ($scope.twoFactorProvider === constants.twoFactorProvider.duo ||
|
||||||
params = $scope.twoFactorProviders[constants.twoFactorProvider.duo];
|
$scope.twoFactorProvider === constants.twoFactorProvider.organizationDuo) {
|
||||||
|
params = $scope.twoFactorProviders[$scope.twoFactorProvider];
|
||||||
|
|
||||||
$window.Duo.init({
|
$window.Duo.init({
|
||||||
host: params.Host,
|
host: params.Host,
|
||||||
|
@ -6,6 +6,9 @@
|
|||||||
|
|
||||||
$scope.providers = [];
|
$scope.providers = [];
|
||||||
|
|
||||||
|
if (providers.hasOwnProperty(constants.twoFactorProvider.organizationDuo)) {
|
||||||
|
add(constants.twoFactorProvider.organizationDuo);
|
||||||
|
}
|
||||||
if (providers.hasOwnProperty(constants.twoFactorProvider.authenticator)) {
|
if (providers.hasOwnProperty(constants.twoFactorProvider.authenticator)) {
|
||||||
add(constants.twoFactorProvider.authenticator);
|
add(constants.twoFactorProvider.authenticator);
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,8 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ng-if="twoFactorProvider === twoFactorProviderConstants.duo">
|
<div ng-if="twoFactorProvider === twoFactorProviderConstants.duo ||
|
||||||
|
twoFactorProvider === twoFactorProviderConstants.organizationDuo">
|
||||||
<p class="login-box-msg">
|
<p class="login-box-msg">
|
||||||
Complete logging in with Duo.
|
Complete logging in with Duo.
|
||||||
</p>
|
</p>
|
||||||
|
@ -106,7 +106,8 @@ angular.module('bit')
|
|||||||
image: 'authapp.png',
|
image: 'authapp.png',
|
||||||
displayOrder: 0,
|
displayOrder: 0,
|
||||||
priority: 1,
|
priority: 1,
|
||||||
requiresUsb: false
|
requiresUsb: false,
|
||||||
|
organization: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 3,
|
type: 3,
|
||||||
@ -117,7 +118,8 @@ angular.module('bit')
|
|||||||
image: 'yubico.png',
|
image: 'yubico.png',
|
||||||
displayOrder: 1,
|
displayOrder: 1,
|
||||||
priority: 3,
|
priority: 3,
|
||||||
requiresUsb: true
|
requiresUsb: true,
|
||||||
|
organization: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 2,
|
type: 2,
|
||||||
@ -128,7 +130,8 @@ angular.module('bit')
|
|||||||
image: 'duo.png',
|
image: 'duo.png',
|
||||||
displayOrder: 2,
|
displayOrder: 2,
|
||||||
priority: 2,
|
priority: 2,
|
||||||
requiresUsb: false
|
requiresUsb: false,
|
||||||
|
organization: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 4,
|
type: 4,
|
||||||
@ -139,7 +142,8 @@ angular.module('bit')
|
|||||||
image: 'fido.png',
|
image: 'fido.png',
|
||||||
displayOrder: 3,
|
displayOrder: 3,
|
||||||
priority: 4,
|
priority: 4,
|
||||||
requiresUsb: true
|
requiresUsb: true,
|
||||||
|
organization: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 1,
|
type: 1,
|
||||||
@ -151,20 +155,21 @@ angular.module('bit')
|
|||||||
image: 'gmail.png',
|
image: 'gmail.png',
|
||||||
displayOrder: 4,
|
displayOrder: 4,
|
||||||
priority: 0,
|
priority: 0,
|
||||||
requiresUsb: false
|
requiresUsb: false,
|
||||||
}
|
organization: false
|
||||||
],
|
},
|
||||||
orgTwoFactorProviderInfo: [
|
|
||||||
{
|
{
|
||||||
type: 6,
|
type: 6,
|
||||||
name: 'Duo',
|
name: 'Duo (Organization)',
|
||||||
description: 'Verify with Duo Security using the Duo Mobile app, SMS, phone call, or U2F security key.',
|
description: 'Verify with Duo Security for your organization using the Duo Mobile app, SMS, ' +
|
||||||
|
'phone call, or U2F security key.',
|
||||||
enabled: false,
|
enabled: false,
|
||||||
active: true,
|
active: true,
|
||||||
image: 'duo.png',
|
image: 'duo.png',
|
||||||
displayOrder: 1,
|
displayOrder: 1,
|
||||||
priority: 0,
|
priority: 10,
|
||||||
requiresUsb: false
|
requiresUsb: false,
|
||||||
|
organization: true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
plans: {
|
plans: {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
$analytics, appSettings, constants, $filter) {
|
$analytics, appSettings, constants, $filter) {
|
||||||
$scope.selfHosted = appSettings.selfHosted;
|
$scope.selfHosted = appSettings.selfHosted;
|
||||||
$scope.model = {};
|
$scope.model = {};
|
||||||
$scope.twoStepProviders = constants.orgTwoFactorProviderInfo;
|
$scope.twoStepProviders = $filter('filter')(constants.twoFactorProviderInfo, { organization: true });
|
||||||
$scope.use2fa = false;
|
$scope.use2fa = false;
|
||||||
|
|
||||||
$scope.$on('$viewContentLoaded', function () {
|
$scope.$on('$viewContentLoaded', function () {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
.controller('settingsTwoStepController', function ($scope, apiService, toastr, $analytics, constants,
|
.controller('settingsTwoStepController', function ($scope, apiService, toastr, $analytics, constants,
|
||||||
$filter, $uibModal, authService) {
|
$filter, $uibModal, authService) {
|
||||||
$scope.providers = constants.twoFactorProviderInfo;
|
$scope.providers = $filter('filter')(constants.twoFactorProviderInfo, { organization: false });
|
||||||
$scope.premium = true;
|
$scope.premium = true;
|
||||||
|
|
||||||
authService.getUserProfile().then(function (profile) {
|
authService.getUserProfile().then(function (profile) {
|
||||||
|
Loading…
Reference in New Issue
Block a user