Skip to content
Snippets Groups Projects
Commit ad049a8e authored by Robert Speicher's avatar Robert Speicher
Browse files

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

parent 5fa02489
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment