mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-31 17:57:43 +01:00
update 2fa setup pages
This commit is contained in:
parent
73eb743f54
commit
7a19d444f1
@ -5,6 +5,7 @@
|
|||||||
authService, toastr, $analytics, constants, $timeout, $window) {
|
authService, toastr, $analytics, constants, $timeout, $window) {
|
||||||
$analytics.eventTrack('settingsTwoStepU2fController', { category: 'Modal' });
|
$analytics.eventTrack('settingsTwoStepU2fController', { category: 'Modal' });
|
||||||
var _masterPasswordHash;
|
var _masterPasswordHash;
|
||||||
|
var closed = false;
|
||||||
|
|
||||||
$scope.deviceResponse = null;
|
$scope.deviceResponse = null;
|
||||||
$scope.deviceListening = false;
|
$scope.deviceListening = false;
|
||||||
@ -24,6 +25,12 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
$scope.readDevice = function () {
|
$scope.readDevice = function () {
|
||||||
|
if (closed) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log('listening for key...');
|
||||||
|
|
||||||
$scope.deviceResponse = null;
|
$scope.deviceResponse = null;
|
||||||
$scope.deviceError = false;
|
$scope.deviceError = false;
|
||||||
$scope.deviceListening = true;
|
$scope.deviceListening = true;
|
||||||
@ -33,11 +40,11 @@
|
|||||||
challenge: $scope.challenge.Challenge
|
challenge: $scope.challenge.Challenge
|
||||||
}], [], function (data) {
|
}], [], function (data) {
|
||||||
$scope.deviceListening = false;
|
$scope.deviceListening = false;
|
||||||
|
if (data.errorCode === 5) {
|
||||||
console.log('call back data:');
|
$scope.readDevice();
|
||||||
console.log(data);
|
return;
|
||||||
|
}
|
||||||
if (data.errorCode) {
|
else if (data.errorCode) {
|
||||||
$scope.deviceError = true;
|
$scope.deviceError = true;
|
||||||
$scope.$apply();
|
$scope.$apply();
|
||||||
console.log('error: ' + data.errorCode);
|
console.log('error: ' + data.errorCode);
|
||||||
@ -46,7 +53,7 @@
|
|||||||
|
|
||||||
$scope.deviceResponse = JSON.stringify(data);
|
$scope.deviceResponse = JSON.stringify(data);
|
||||||
$scope.$apply();
|
$scope.$apply();
|
||||||
});
|
}, 5);
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.submit = function () {
|
$scope.submit = function () {
|
||||||
@ -90,4 +97,8 @@
|
|||||||
$scope.close = function () {
|
$scope.close = function () {
|
||||||
$uibModalInstance.close($scope.enabled);
|
$uibModalInstance.close($scope.enabled);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.$on('modal.closing', function (event) {
|
||||||
|
closed = true;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
<li ng-repeat="e in submitTwoStepForm.$errors">{{e}}</li>
|
<li ng-repeat="e in submitTwoStepForm.$errors">{{e}}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<p>Setting up two-step login with Duo is easy, just enter the Duo application information below:</p>
|
<p>Enter the bitwarden application information from your Duo Admin panel:</p>
|
||||||
<div class="form-group" show-errors>
|
<div class="form-group" show-errors>
|
||||||
<label for="ikey">Integration Key</label>
|
<label for="ikey">Integration Key</label>
|
||||||
<input type="text" id="ikey" name="IntegrationKey" ng-model="updateModel.ikey" class="form-control"
|
<input type="text" id="ikey" name="IntegrationKey" ng-model="updateModel.ikey" class="form-control"
|
||||||
|
@ -43,25 +43,28 @@
|
|||||||
<li ng-repeat="e in submitTwoStepForm.$errors">{{e}}</li>
|
<li ng-repeat="e in submitTwoStepForm.$errors">{{e}}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<p>Setting up two-step login with a FIDO U2F security key is easy, just follow these steps:</p>
|
<p>To add a new FIDO U2F Security Key to your account:</p>
|
||||||
<h4>1. Plug your security key into your USB port</h4>
|
<ol>
|
||||||
<h4 style="margin-top: 30px;">2. Touch the button on the security key</h4>
|
<li>Plug the security key into your computer's USB port.</li>
|
||||||
<p>
|
<li>If the security key has a button, touch it.</li>
|
||||||
<button type="button" ng-click="readDevice()" class="btn btn-default btn-flat">
|
</ol>
|
||||||
<i class="fa fa-spin fa-refresh fa-fw" ng-show="deviceListening"></i>
|
<hr />
|
||||||
<i class="fa fa-wifi fa-fw" ng-show="!deviceListening"></i>
|
<div class="text-center">
|
||||||
Read Security Key
|
<div ng-show="deviceListening">
|
||||||
</button>
|
<p><i class="fa fa-spin fa-spinner fa-2x"></i></p>
|
||||||
</p>
|
<p>Waiting for you to touch the button on your security key...</p>
|
||||||
<div ng-show="deviceListening">
|
</div>
|
||||||
Waiting for you to touch the button on your security key...
|
<div class="text-green" ng-show="deviceResponse">
|
||||||
</div>
|
<p><i class="fa fa-check-circle fa-2x"></i></p>
|
||||||
<div class="text-green" ng-show="deviceResponse">
|
<p>Success!</p>
|
||||||
<i class="fa fa-check"></i>
|
Click the "Enable" button below to enable this security key for two-step login.
|
||||||
Got it! Click the "Enable" button below to enable this security key for two-step login.
|
</div>
|
||||||
</div>
|
<div class="text-red" ng-show="deviceError">
|
||||||
<div class="text-red" ng-show="deviceError">
|
<p><i class="fa fa-warning fa-2x"></i></p>
|
||||||
There was a problem reading the security key. Try again.
|
<p>Error!</p>
|
||||||
|
<p>There was a problem reading the security key.</p>
|
||||||
|
<button type="button" class="btn btn-default btn-flat" ng-click="readDevice()">Try again</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -44,10 +44,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<p>To add a new YubiKey to your account:</p>
|
<p>To add a new YubiKey to your account:</p>
|
||||||
<ol>
|
<ol>
|
||||||
<li>Plug the YubiKey into your USB port.</li>
|
<li>Plug the YubiKey (NEO or 4 series) into your computer's USB port.</li>
|
||||||
<li>Select in the first empty <b>Key</b> field below.</li>
|
<li>Select in the first empty <b>Key</b> field below.</li>
|
||||||
<li>Touch the YubiKey's button.</li>
|
<li>Touch the YubiKey's button.</li>
|
||||||
<li>Finally, save the form.</li>
|
<li>Save the form.</li>
|
||||||
</ol>
|
</ol>
|
||||||
<hr />
|
<hr />
|
||||||
<div class="form-group" show-errors>
|
<div class="form-group" show-errors>
|
||||||
|
Loading…
Reference in New Issue
Block a user