2016-08-24 12:49:21 +05:30
|
|
|
- if inject_u2f_api?
|
|
|
|
- content_for :page_specific_javascripts do
|
|
|
|
= page_specific_javascript_tag('u2f.js')
|
|
|
|
|
2015-09-11 14:41:01 +05:30
|
|
|
%div
|
|
|
|
.login-box
|
|
|
|
.login-heading
|
2016-06-16 23:09:34 +05:30
|
|
|
%h3 Two-Factor Authentication
|
2015-09-11 14:41:01 +05:30
|
|
|
.login-body
|
2016-06-16 23:09:34 +05:30
|
|
|
- if @user.two_factor_otp_enabled?
|
|
|
|
%h5 Authenticate via Two-Factor App
|
|
|
|
= form_for(resource, as: resource_name, url: session_path(resource_name), method: :post) do |f|
|
|
|
|
- resource_params = params[resource_name].presence || params
|
|
|
|
= f.hidden_field :remember_me, value: resource_params.fetch(:remember_me, 0)
|
|
|
|
= f.text_field :otp_attempt, class: 'form-control', placeholder: 'Two-Factor Authentication code', required: true, autofocus: true, autocomplete: 'off'
|
|
|
|
%p.help-block.hint Enter the code from the two-factor app on your mobile device. If you've lost your device, you may enter one of your recovery codes.
|
|
|
|
.prepend-top-20
|
|
|
|
= f.submit "Verify code", class: "btn btn-save"
|
|
|
|
|
|
|
|
- if @user.two_factor_u2f_enabled?
|
|
|
|
|
|
|
|
%hr
|
|
|
|
= render "u2f/authenticate"
|