2020-10-18 01:39:46 -07:00
|
|
|
.card
|
|
|
|
.card-body
|
|
|
|
%h2= t('views.settings.security.2fa.title')
|
2020-10-18 10:48:12 -07:00
|
|
|
- if current_user.otp_module_disabled?
|
|
|
|
.totp-setup
|
|
|
|
.totp-setup__left
|
|
|
|
.totp-setup__card
|
|
|
|
.totp-setup__qr
|
2020-10-19 06:55:00 -07:00
|
|
|
= qr_svg
|
2020-10-18 10:48:12 -07:00
|
|
|
%p.totp-setup__text
|
|
|
|
If you cannot scan the QR code, use the following key instead:
|
|
|
|
%code= current_user.otp_secret_key.scan(/.{4}/).flatten.join(' ')
|
|
|
|
.totp-setup__right
|
|
|
|
= bootstrap_form_for(current_user, url: { action: :update_2fa, method: :post }) do |f|
|
|
|
|
%p
|
|
|
|
If you do not have an authenticator app already installed on your device, we suggest one of the following:
|
|
|
|
%ul.list-unstyled.pl-3
|
|
|
|
%li
|
2020-10-19 05:56:30 -07:00
|
|
|
%i.fa.fa-android
|
|
|
|
Aegis Authenticator for Android
|
|
|
|
%ul.list-inline
|
|
|
|
%li.list-inline-item
|
2020-10-19 06:02:04 -07:00
|
|
|
%a{ href: 'https://play.google.com/store/apps/details?id=com.beemdevelopment.aegis' } Google Play
|
2020-10-19 05:56:30 -07:00
|
|
|
%li.list-inline-item
|
2020-10-19 06:02:04 -07:00
|
|
|
%a{ href: 'https://f-droid.org/app/com.beemdevelopment.aegis' } F-Droid
|
2020-10-19 05:56:30 -07:00
|
|
|
%li.list-inline-item
|
2020-10-19 06:02:04 -07:00
|
|
|
%a{ href: 'https://github.com/beemdevelopment/Aegis' } Source Code
|
2020-10-18 10:48:12 -07:00
|
|
|
%li
|
2020-10-19 05:56:30 -07:00
|
|
|
%i.fa.fa-apple
|
|
|
|
Strongbox Authenticator for iOS
|
|
|
|
%ul.list-inline
|
|
|
|
%li.list-inline-item
|
2020-10-19 06:02:04 -07:00
|
|
|
%a{ href: 'https://apps.apple.com/gb/app/strongbox-authenticator/id1023839880' } App Store
|
2020-10-19 06:55:00 -07:00
|
|
|
%li
|
|
|
|
%i.fa.fa-apple
|
|
|
|
%i.fa.fa-android
|
|
|
|
Microsoft Authenticator
|
|
|
|
%ul.list-inline
|
|
|
|
%li.list-inline-item
|
|
|
|
%a{ href: 'https://apps.apple.com/gb/app/microsoft-authenticator/id983156458' } App Store
|
|
|
|
%li.list-inline-item
|
|
|
|
%a{ href: 'https://play.google.com/store/apps/details?id=com.azure.authenticator' } Google Play
|
2020-10-18 10:48:12 -07:00
|
|
|
%p Once you have downloaded an authenticator app, add your Retrospring account by scanning the QR code displayed on the left.
|
|
|
|
= f.text_field :otp_validation, class: 'totp-setup__code-field', label: 'Enter the code displayed in the app here:'
|
|
|
|
= f.hidden_field :otp_secret_key, value: current_user.otp_secret_key
|
|
|
|
= f.submit t('views.actions.save'), class: 'btn btn-primary'
|
2020-10-18 01:39:46 -07:00
|
|
|
- else
|
2020-10-18 11:49:11 -07:00
|
|
|
%p Your account is set up to require the use of a one-time password in order to log in
|
2020-10-19 06:55:00 -07:00
|
|
|
= link_to t('views.actions.remove'), destroy_user_2fa_path, class: 'btn btn-primary', method: 'delete',
|
|
|
|
data: { confirm: t('views.settings.security.2fa.detach_confirm') }
|