diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-05-23 01:33:44 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-05-23 22:04:40 +0300 |
commit | e73ea12695c5b15c950a40adfceae83141124c20 (patch) | |
tree | 99652579f61bd5553bcad8e8feb513273c23fe5c /app/controllers | |
parent | f042b085f64223ffe7b9d26f003ee2db76af27a6 (diff) |
Add support for manually entering 2FA details
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/profiles/two_factor_auths_controller.rb | 3 |
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 |