-lorem="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed fermentum nisi sapien, non consequat lectus aliquam ultrices. Suspendisse sodales est euismod nunc condimentum, a consectetur diam ornare."
-lorem="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed fermentum nisi sapien, non consequat lectus aliquam ultrices. Suspendisse sodales est euismod nunc condimentum, a consectetur diam ornare."
Use an app on your mobile device to enable two-factor authentication (2FA).
.col-lg-8
-ifcurrent_user.two_factor_otp_enabled?
=icon"check inverse",base: "circle",class: "text-success",text: "You've already enabled two-factor authentication using mobile authenticator applications. You can disable it from your account settings page."
-else
%p
%p
Download the Google Authenticator application from App Store or Google Play Store and scan this code.
Use an app on your mobile device to enable two-factor authentication (2FA).
More information is available in the #{link_to('documentation',help_page_path('profile/two_factor_authentication'))}.
.col-lg-8
.row.append-bottom-10
-ifcurrent_user.two_factor_otp_enabled?
.col-md-4
=icon"check inverse",base: "circle",class: "text-success",text: "You've already enabled two-factor authentication using mobile authenticator applications. You can disable it from your account settings page."
=raw@qr_code
-else
.col-md-8
%p
.account-well
Download the Google Authenticator application from App Store or Google Play Store and scan this code.
%p.prepend-top-0.append-bottom-0
More information is available in the #{link_to('documentation',help_page_path('profile/two_factor_authentication'))}.
Can't scan the code?
.row.append-bottom-10
%p.prepend-top-0.append-bottom-0
.col-md-4
To add the entry manually, provide the following details to the application on your phone.
=raw@qr_code
%p.prepend-top-0.append-bottom-0
.col-md-8
Account:
.account-well
=@account_string
%p.prepend-top-0.append-bottom-0
%p.prepend-top-0.append-bottom-0
Can't scan the code?
Key:
%p.prepend-top-0.append-bottom-0
=current_user.otp_secret.scan(/.{4}/).join(' ')
To add the entry manually, provide the following details to the application on your phone.
=submit_tag'Register with two-factor app',class: 'btn btn-success'
%hr
%hr
.row.prepend-top-default
.row.prepend-top-default
.col-lg-4
.col-lg-4
%h4.prepend-top-0
%h4.prepend-top-0
Register Universal Two-Factor (U2F) Device
Register Universal Two-Factor (U2F) Device
%p
%p
Use a hardware device to add the second factor of authentication.
Use a hardware device to add the second factor of authentication.
%p
%p
As U2F devices are only supported by a few browsers, we require that you set up a
As U2F devices are only supported by a few browsers, we require that you set up a
two-factor authentication app before a U2F device. That way you'll always be able to
two-factor authentication app before a U2F device. That way you'll always be able to
log in - even when you're using an unsupported browser.
log in - even when you're using an unsupported browser.
.col-lg-8
.col-lg-8
-if@u2f_registration.errors.present?
-if@u2f_registration.errors.present?
=form_errors(@u2f_registration)
=form_errors(@u2f_registration)
=render"u2f/register"
=render"u2f/register"
%hr
%hr
%h5 U2F Devices (#{@u2f_registrations.length})
%h5 U2F Devices (#{@u2f_registrations.length})
-if@u2f_registrations.present?
-if@u2f_registrations.present?
.table-responsive
.table-responsive
%table.table.table-bordered.u2f-registrations
%table.table.table-bordered.u2f-registrations
%colgroup
%colgroup
%col{width: "50%"}
%col{width: "50%"}
%col{width: "30%"}
%col{width: "30%"}
%col{width: "20%"}
%col{width: "20%"}
%thead
%thead
%tr
%th Name
%th Registered On
%th
%tbody
-@u2f_registrations.eachdo|registration|
%tr
%tr
%td=registration.name.presence||"<no name set>"
%th Name
%td=registration.created_at.to_date.to_s(:medium)
%th Registered On
%td=link_to"Delete",profile_u2f_registration_path(registration),method: :delete,class: "btn btn-danger pull-right",data: {confirm: "Are you sure you want to delete this device? This action cannot be undone."}
%th
%tbody
-else
-@u2f_registrations.eachdo|registration|
.settings-message.text-center
%tr
You don't have any U2F devices registered yet.
%td=registration.name.presence||"<no name set>"
%td=registration.created_at.to_date.to_s(:medium)
%td=link_to"Delete",profile_u2f_registration_path(registration),method: :delete,class: "btn btn-danger pull-right",data: {confirm: "Are you sure you want to delete this device? This action cannot be undone."}
-iftwo_factor_skippable?
-else
:javascript
.settings-message.text-center
varbutton="<a class='btn btn-xs btn-warning pull-right' data-method='patch' href='#{skip_profile_two_factor_auth_path}'>Configure it later</a>";