2016-06-06 00:44:51 -04:00
|
|
|
#js-register-u2f
|
|
|
|
|
|
|
|
%script#js-register-u2f-not-supported{ type: "text/template" }
|
|
|
|
%p Your browser doesn't support U2F. Please use Google Chrome desktop (version 41 or newer).
|
|
|
|
|
|
|
|
%script#js-register-u2f-setup{ type: "text/template" }
|
2016-06-10 06:37:05 -04:00
|
|
|
- if current_user.two_factor_otp_enabled?
|
|
|
|
.row.append-bottom-10
|
2017-09-08 08:40:49 -04:00
|
|
|
.col-md-4
|
|
|
|
%button#js-setup-u2f-device.btn.btn-info.btn-block Setup new U2F device
|
|
|
|
.col-md-8
|
2016-06-10 06:37:05 -04:00
|
|
|
%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
|
2017-09-08 08:40:49 -04:00
|
|
|
.col-md-4
|
|
|
|
%button#js-setup-u2f-device.btn.btn-info.btn-block{ disabled: true } Setup new U2F device
|
|
|
|
.col-md-8
|
2016-06-10 06:37:05 -04:00
|
|
|
%p.text-warning You need to register a two-factor authentication app before you can set up a U2F device.
|
2016-06-06 00:44:51 -04:00
|
|
|
|
|
|
|
%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.
|
|
|
|
|
|
|
|
%script#js-register-u2f-error{ type: "text/template" }
|
|
|
|
%div
|
|
|
|
%p
|
2016-11-05 07:28:48 -04:00
|
|
|
%span <%= error_message %> (error code: <%= error_code %>)
|
2016-06-06 00:44:51 -04:00
|
|
|
%a.btn.btn-warning#js-u2f-try-again Try again?
|
|
|
|
|
|
|
|
%script#js-register-u2f-registered{ type: "text/template" }
|
2016-12-23 04:37:12 -05:00
|
|
|
.row.append-bottom-10
|
2016-08-18 02:58:36 -04:00
|
|
|
.col-md-12
|
|
|
|
%p Your device was successfully set up! Give it a name and register it with the GitLab server.
|
|
|
|
= form_tag(create_u2f_profile_two_factor_auth_path, method: :post) do
|
|
|
|
.row.append-bottom-10
|
|
|
|
.col-md-3
|
|
|
|
= text_field_tag 'u2f_registration[name]', nil, class: 'form-control', placeholder: "Pick a name"
|
|
|
|
.col-md-3
|
|
|
|
= hidden_field_tag 'u2f_registration[device_response]', nil, class: 'form-control', required: true, id: "js-device-response"
|
2017-04-03 19:10:06 -04:00
|
|
|
= submit_tag "Register U2F device", class: "btn btn-success"
|