提交 de5c9b79 编写于 作者: D Dmitriy Zaporozhets

Merge branch 'rs-dev-issue-2373' into 'master'

Prefix 2FA issuer with the GitLab host (e.g., 'dev.gitlab.org')

https://dev.gitlab.org/gitlab/gitlabhq/issues/2373

See merge request !821
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册