about summary refs log tree commit diff
path: root/app/controllers/settings
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-02-13 20:56:03 +0100
committerEugen Rochko <eugen@zeonfederated.com>2017-02-13 20:56:03 +0100
commit63886bdc5976ee72df168053352899174095335a (patch)
treefcde1067523eb55308afe4238165566e0516f421 /app/controllers/settings
parentbae7cf8ccecd7c670cd4c1a00c5c19f85c2487b6 (diff)
Fix #587 - Display TOTP secret next to QR code
Diffstat (limited to 'app/controllers/settings')
-rw-r--r--app/controllers/settings/two_factor_auths_controller.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/settings/two_factor_auths_controller.rb b/app/controllers/settings/two_factor_auths_controller.rb
index f34295cb9..cfee92391 100644
--- a/app/controllers/settings/two_factor_auths_controller.rb
+++ b/app/controllers/settings/two_factor_auths_controller.rb
@@ -8,7 +8,8 @@ class Settings::TwoFactorAuthsController < ApplicationController
   def show
     return unless current_user.otp_required_for_login
 
-    @qrcode = RQRCode::QRCode.new(current_user.otp_provisioning_uri(current_user.email, issuer: Rails.configuration.x.local_domain))
+    @provision_url = current_user.otp_provisioning_uri(current_user.email, issuer: Rails.configuration.x.local_domain)
+    @qrcode        = RQRCode::QRCode.new(@provision_url)
   end
 
   def enable