summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2018-07-19 10:38:04 +0000
committerDouwe Maan <douwe@gitlab.com>2018-07-19 10:38:04 +0000
commitae55ffe084f955ffde3ac05b0e650e07e67188ab (patch)
treeef2b1fce4236fede53a4e71aebb4eb3df53bf3ac
parent59eb9938f66f8c24770b06f4d435e4df0acef252 (diff)
parent31ea2e4eb537f0d7be687cc18baed9da8fecf19c (diff)
downloadgitlab-ce-ae55ffe084f955ffde3ac05b0e650e07e67188ab.tar.gz
Merge branch 'regen-2fa-codes' into 'master'
Add button to regenerate 2FA codes. Closes #48408 See merge request gitlab-org/gitlab-ce!20295
-rw-r--r--app/views/profiles/two_factor_auths/show.html.haml8
-rw-r--r--changelogs/unreleased/regen-2fa-codes.yml5
2 files changed, 12 insertions, 1 deletions
diff --git a/app/views/profiles/two_factor_auths/show.html.haml b/app/views/profiles/two_factor_auths/show.html.haml
index e35ebdea435..6950e2e332d 100644
--- a/app/views/profiles/two_factor_auths/show.html.haml
+++ b/app/views/profiles/two_factor_auths/show.html.haml
@@ -13,10 +13,16 @@
- if current_user.two_factor_otp_enabled?
%p
You've already enabled two-factor authentication using mobile authenticator applications. In order to register a different device, you must first disable two-factor authentication.
+ %p
+ If you lose your recovery codes you can generate new ones, invalidating all previous codes.
+ %div
= link_to 'Disable two-factor authentication', profile_two_factor_auth_path,
method: :delete,
data: { confirm: "Are you sure? This will invalidate your registered applications and U2F devices." },
- class: 'btn btn-danger'
+ class: 'btn btn-danger append-right-10'
+ = form_tag codes_profile_two_factor_auth_path, {style: 'display: inline-block', method: :post} do |f|
+ = submit_tag 'Regenerate recovery codes', class: 'btn'
+
- else
%p
Download the Google Authenticator application from App Store or Google Play Store and scan this code.
diff --git a/changelogs/unreleased/regen-2fa-codes.yml b/changelogs/unreleased/regen-2fa-codes.yml
new file mode 100644
index 00000000000..596f759df0f
--- /dev/null
+++ b/changelogs/unreleased/regen-2fa-codes.yml
@@ -0,0 +1,5 @@
+---
+title: Added button to regenerate 2FA codes
+merge_request:
+author: Luke Picciau
+type: added