BigW Consortium Gitlab

_authenticate.html.haml 1.12 KB
Newer Older
1
#js-authenticate-u2f
2
%a.btn.btn-block.btn-info#js-login-2fa-device{ href: '#' } Sign in via 2FA code
3 4 5 6 7 8 9 10 11

%script#js-authenticate-u2f-not-supported{ type: "text/template" }
  %p Your browser doesn't support U2F. Please use Google Chrome desktop (version 41 or newer).

%script#js-authenticate-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-authenticate-u2f-error{ type: "text/template" }
  %div
12
    %p <%= error_message %> (error code: <%= error_code %>)
13
    %a.btn.btn-block.btn-warning#js-u2f-try-again Try again?
14 15 16

%script#js-authenticate-u2f-authenticated{ type: "text/template" }
  %div
17 18
    %p We heard back from your U2F device. You have been authenticated.
    = form_tag(new_user_session_path, method: :post, id: 'js-login-u2f-form') do |f|
19 20
      - resource_params = params[resource_name].presence || params
      = hidden_field_tag 'user[remember_me]', resource_params.fetch(:remember_me, 0)
21
      = hidden_field_tag 'user[device_response]', nil, class: 'form-control', required: true, id: "js-device-response"