summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2015-06-15 18:12:32 -0400
committerRobert Speicher <rspeicher@gmail.com>2015-06-16 13:08:29 -0400
commitad049a8e523477f805dad13f31304c6f2bbfed7b (patch)
tree738f2c96c2c3e95893f30938c17a449e8b593932 /app
parent5fa0248966316d672429eabc46407e1429ef2283 (diff)
downloadgitlab-ce-ad049a8e523477f805dad13f31304c6f2bbfed7b.tar.gz
Prefix 2FA issuer with the GitLab host (e.g., 'dev.gitlab.org')rs-dev-issue-2373
Diffstat (limited to 'app')
-rw-r--r--app/controllers/profiles/two_factor_auths_controller.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/profiles/two_factor_auths_controller.rb b/app/controllers/profiles/two_factor_auths_controller.rb
index 42579b3eb44..e7579c652fb 100644
--- a/app/controllers/profiles/two_factor_auths_controller.rb
+++ b/app/controllers/profiles/two_factor_auths_controller.rb
@@ -43,8 +43,12 @@ class Profiles::TwoFactorAuthsController < Profiles::ApplicationController
private
def build_qr_code
- issuer = "GitLab | #{current_user.email}"
+ issuer = "#{issuer_host} | #{current_user.email}"
uri = current_user.otp_provisioning_uri(current_user.email, issuer: issuer)
RQRCode::render_qrcode(uri, :svg, level: :m, unit: 3)
end
+
+ def issuer_host
+ Gitlab.config.gitlab.host
+ end
end