2016-06-06 00:50:39 -04:00
|
|
|
#js-authenticate-u2f
|
2018-11-19 14:56:01 -05:00
|
|
|
%a.btn.btn-block.btn-info#js-login-2fa-device{ href: '#' }= _("Sign in via 2FA code")
|
2016-06-06 00:50:39 -04:00
|
|
|
|
2018-02-28 17:59:50 -05:00
|
|
|
-# haml-lint:disable InlineJavaScript
|
2016-06-06 00:50:39 -04:00
|
|
|
%script#js-authenticate-u2f-in-progress{ type: "text/template" }
|
2018-11-19 14:56:01 -05:00
|
|
|
%p= _("Trying to communicate with your device. Plug it in (if you haven't already) and press the button on the device now.")
|
2016-06-06 00:50:39 -04:00
|
|
|
|
|
|
|
%script#js-authenticate-u2f-error{ type: "text/template" }
|
|
|
|
%div
|
2018-11-19 14:56:01 -05:00
|
|
|
%p <%= error_message %> (#{_("error code:")} <%= error_code %>)
|
|
|
|
%a.btn.btn-block.btn-warning#js-u2f-try-again= _("Try again?")
|
2016-06-06 00:50:39 -04:00
|
|
|
|
|
|
|
%script#js-authenticate-u2f-authenticated{ type: "text/template" }
|
|
|
|
%div
|
2018-11-19 14:56:01 -05:00
|
|
|
%p= _("We heard back from your U2F device. You have been authenticated.")
|
2016-12-24 11:53:13 -05:00
|
|
|
= form_tag(new_user_session_path, method: :post, id: 'js-login-u2f-form') do |f|
|
2016-08-19 21:51:56 -04:00
|
|
|
- resource_params = params[resource_name].presence || params
|
|
|
|
= hidden_field_tag 'user[remember_me]', resource_params.fetch(:remember_me, 0)
|
2016-06-06 00:50:39 -04:00
|
|
|
= hidden_field_tag 'user[device_response]', nil, class: 'form-control', required: true, id: "js-device-response"
|