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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2015-05-23 01:33:44 +0300
committerRobert Speicher <rspeicher@gmail.com>2015-05-23 22:04:40 +0300
commite73ea12695c5b15c950a40adfceae83141124c20 (patch)
tree99652579f61bd5553bcad8e8feb513273c23fe5c /app/controllers
parentf042b085f64223ffe7b9d26f003ee2db76af27a6 (diff)
Add support for manually entering 2FA details
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/profiles/two_factor_auths_controller.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/profiles/two_factor_auths_controller.rb b/app/controllers/profiles/two_factor_auths_controller.rb
index 30ee6891733..17abcea2068 100644
--- a/app/controllers/profiles/two_factor_auths_controller.rb
+++ b/app/controllers/profiles/two_factor_auths_controller.rb
@@ -1,7 +1,7 @@
class Profiles::TwoFactorAuthsController < Profiles::ApplicationController
def new
unless current_user.otp_secret
- current_user.otp_secret = User.generate_otp_secret
+ current_user.otp_secret = User.generate_otp_secret(16)
current_user.save!
end
@@ -18,6 +18,7 @@ class Profiles::TwoFactorAuthsController < Profiles::ApplicationController
else
@error = 'Invalid pin code'
@qr_code = build_qr_code
+
render 'new'
end
end