Commit fbb06125 authored by Timothy Andrew's avatar Timothy Andrew

Don't allow clicking on "Setup New U2F Device" unless an authenticator app has been set up.

- Also change the help message to indicate that an authenticator app is
  now a prerequisite for U2F.
parent f34af6b8
...@@ -51,9 +51,9 @@ ...@@ -51,9 +51,9 @@
%p %p
Use a hardware device to add the second factor of authentication. Use a hardware device to add the second factor of authentication.
%p %p
As U2F devices are only supported by a few browsers, it's recommended that you set up a As U2F devices are only supported by a few browsers, we require that you set up a
two-factor authentication app as well as a U2F device so you'll always be able to log in two-factor authentication app before a U2F device. That way you'll always be able to
using an unsupported browser. log in - even when you're using an unsupported browser.
.col-lg-9 .col-lg-9
%p %p
- if @registration_key_handles.present? - if @registration_key_handles.present?
......
...@@ -4,11 +4,18 @@ ...@@ -4,11 +4,18 @@
%p Your browser doesn't support U2F. Please use Google Chrome desktop (version 41 or newer). %p Your browser doesn't support U2F. Please use Google Chrome desktop (version 41 or newer).
%script#js-register-u2f-setup{ type: "text/template" } %script#js-register-u2f-setup{ type: "text/template" }
.row.append-bottom-10 - if current_user.two_factor_otp_enabled?
.col-md-3 .row.append-bottom-10
%a#js-setup-u2f-device.btn.btn-info{ href: 'javascript:void(0)' } Setup New U2F Device .col-md-3
.col-md-9 %button#js-setup-u2f-device.btn.btn-info Setup New U2F Device
%p Your U2F device needs to be set up. Plug it in (if not already) and click the button on the left. .col-md-9
%p Your U2F device needs to be set up. Plug it in (if not already) and click the button on the left.
- else
.row.append-bottom-10
.col-md-3
%button#js-setup-u2f-device.btn.btn-info{ disabled: true } Setup New U2F Device
.col-md-9
%p.text-warning You need to register a two-factor authentication app before you can set up a U2F device.
%script#js-register-u2f-in-progress{ type: "text/template" } %script#js-register-u2f-in-progress{ type: "text/template" }
%p Trying to communicate with your device. Plug it in (if you haven't already) and press the button on the device now. %p Trying to communicate with your device. Plug it in (if you haven't already) and press the button on the device now.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment