diff --git a/src/Web/wwwroot/_references.js b/src/Web/wwwroot/_references.js index 4e6c6ee7d4..d148fa59c3 100644 --- a/src/Web/wwwroot/_references.js +++ b/src/Web/wwwroot/_references.js @@ -60,7 +60,7 @@ /// /// /// -/// +/// /// /// /// diff --git a/src/Web/wwwroot/app/settings.js b/src/Web/wwwroot/app/settings.js index 1c1621a33b..e95d6b0d32 100644 --- a/src/Web/wwwroot/app/settings.js +++ b/src/Web/wwwroot/app/settings.js @@ -1,2 +1,2 @@ angular.module("bit") -.constant("appSettings", {"rememberedEmailCookieName":"bit.rememberedEmail","version":"1.2.2","environment":"Development","apiUri":"http://localhost:4000"}); +.constant("appSettings", {"rememberedEmailCookieName":"bit.rememberedEmail","version":"1.4.0","environment":"Development","apiUri":"http://localhost:4000"}); diff --git a/src/Web/wwwroot/app/settings/settingsTwoFactorController.js b/src/Web/wwwroot/app/settings/settingsTwoFactorController.js index 1422b7ed80..3c4d2345cb 100644 --- a/src/Web/wwwroot/app/settings/settingsTwoFactorController.js +++ b/src/Web/wwwroot/app/settings/settingsTwoFactorController.js @@ -22,7 +22,8 @@ var key = response.AuthenticatorKey; $scope.twoFactorModel = { enabled: response.TwoFactorEnabled, - key: key.replace(/(.{4})/g, '$1 ').trim(), + key: formatString(key), + recovery: formatString(response.TwoFactorRecoveryCode), qr: 'https://chart.googleapis.com/chart?chs=120x120&chld=L|0&cht=qr&chl=otpauth://totp/' + _issuer + ':' + encodeURIComponent(_profile.email) + '%3Fsecret=' + encodeURIComponent(key) + @@ -31,6 +32,10 @@ }).$promise; }; + function formatString(s) { + return s.replace(/(.{4})/g, '$1 ').trim().toUpperCase(); + } + $scope.update = function (model) { var currentlyEnabled = $scope.twoFactorModel.enabled; if (currentlyEnabled && !confirm('Are you sure you want to disable two-step login?')) { @@ -39,7 +44,7 @@ var request = { enabled: !currentlyEnabled, - token: model ? model.token : null, + token: model.token, masterPasswordHash: _masterPasswordHash }; diff --git a/src/Web/wwwroot/app/settings/views/settingsTwoFactor.html b/src/Web/wwwroot/app/settings/views/settingsTwoFactor.html index 74a5f2202c..c6387c60c1 100644 --- a/src/Web/wwwroot/app/settings/views/settingsTwoFactor.html +++ b/src/Web/wwwroot/app/settings/views/settingsTwoFactor.html @@ -47,35 +47,48 @@

QR

-
+

Can't scan the code? You can add the code to your application manually using the following details:

    -
  • Key: {{twoFactorModel.key}}
  • +
  • Key: {{twoFactorModel.key}}
  • Account: {{account}}
  • Time based: Yes
-
-
-

Errors have occured

-
    -
  • {{e}}
  • -
-
-

3. Enter the resulting verification code from the app

-
- - -
-

NOTE: After enabling two-step login, you will be required to enter the current code generated by your verification app each time you log in.

+
+
+

Recovery Code

+

+ The recovery code allows you to access your account in the event that you lose your authenticator app. + bitwarden support won't be able to assist you if you lose access to your account. We recommend you write down or + print the recovery code below and keep it in a safe place. +

+
    +
  • + Recovery Code: {{twoFactorModel.recovery}} +
  • +
+
+

Errors have occured

+
    +
  • {{e}}
  • +
+
+
+

3. Enter the resulting verification code from the app

+
+ + +
+

NOTE: After enabling two-step login, you will be required to enter the current code generated by your verification app each time you log in.