Welcome to mirror list, hosted at ThFree Co, Russian Federation.

two_factor.html.haml « sessions « devise « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 404484cfb93a893b0df1cf6eb44a96e954d3a558 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
%div
  = render 'devise/shared/tab_single', tab_title: 'Two-Factor Authentication'
  .login-box
    .login-body
      - if @user.two_factor_otp_enabled?
        = form_for(resource, as: resource_name, url: session_path(resource_name), method: :post, html: { class: "edit_user gl-show-field-errors js-2fa-form #{'hidden' if @user.two_factor_webauthn_u2f_enabled?}" }) do |f|
          - resource_params = params[resource_name].presence || params
          = f.hidden_field :remember_me, value: resource_params.fetch(:remember_me, 0)
          %div
            = f.label 'Two-Factor Authentication code', name: :otp_attempt
            = f.text_field :otp_attempt, class: 'form-control gl-form-input', required: true, autofocus: true, autocomplete: 'off', title: 'This field is required.', data: { qa_selector: 'two_fa_code_field' }
            %p.form-text.text-muted.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: "gl-button btn btn-confirm", data: { qa_selector: 'verify_code_button' }
      - if @user.two_factor_webauthn_u2f_enabled?
        = render "authentication/authenticate", params: params, resource: resource, resource_name: resource_name, render_remember_me: true, target_path: new_user_session_path