Add endpoint to remove TOTP to UI and fix typos

This commit is contained in:
syeopite 2021-07-16 14:28:26 -07:00
parent 2d47243c12
commit 361d96bf74
No known key found for this signature in database
GPG key ID: 6FA616E5A5294A82
2 changed files with 8 additions and 4 deletions

View file

@ -424,8 +424,8 @@
"next_steps_error_message": "After which you should try to: ",
"next_steps_error_message_refresh": "Refresh",
"next_steps_error_message_go_to_youtube": "Go to Youtube",
"setup_totp_form_header": "Setup two factor authenticiation (TOTP)",
"setup_totp_instructions_download_auth": "Install an authenticator app (or anything that supports totp) on your device",
"setup_totp_form_header": "Setup two-factor authentication (TOTP)",
"setup_totp_instructions_download_auth": "Install an authenticator app (or anything that supports TOTP) on your device",
"setup_totp_instructions_enter_code": "Enter the following <strong>secret</strong> code:",
"setup_totp_instructions_validate_code": "Enter the 6 digit number on your screen. Be sure to do it under thirty seconds!",
"setup_totp_submit_button": "Setup TOTP",
@ -434,6 +434,6 @@
"general_totp_enter_code_field": "6 digit number",
"general_totp_enter_code_header": "Two-factor authentication",
"general_totp_verify_button": "Verify",
"remove_totp_header": "Remove two-factor authentication",
"remove_totp_header": "Remove two-factor authentication (TOTP)",
"remove_totp_confirm_message": "Are you sure you would like to remove two-factor-authentication?"
}

View file

@ -320,7 +320,11 @@
</div>
<div class="pure-control-group">
<a href="/2fa/setup?referer=<%= URI.encode_www_form(referer) %>"><%= translate(locale, "setup_totp_form_header") %></a>
<% if env.get?("user").as(User).totp_secret %>
<a href="/2fa/remove?referer=<%= URI.encode_www_form(referer) %>"><%= translate(locale, "remove_totp_header") %></a>
<% else %>
<a href="/2fa/setup?referer=<%= URI.encode_www_form(referer) %>"><%= translate(locale, "setup_totp_form_header") %></a>
<% end %>
</div>
<div class="pure-control-group">