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-06-16 01:12:32 +0300
committerRobert Speicher <rspeicher@gmail.com>2015-06-16 20:08:29 +0300
commitad049a8e523477f805dad13f31304c6f2bbfed7b (patch)
tree738f2c96c2c3e95893f30938c17a449e8b593932 /app/controllers/profiles/two_factor_auths_controller.rb
parent5fa0248966316d672429eabc46407e1429ef2283 (diff)
Prefix 2FA issuer with the GitLab host (e.g., 'dev.gitlab.org')
Diffstat (limited to 'app/controllers/profiles/two_factor_auths_controller.rb')
-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