Merge pull request #5763 from tchak/2falocalanddev
Adapt 2FA issuer for local and staging environements
This commit is contained in:
commit
0012fd3aa5
1 changed files with 7 additions and 1 deletions
|
@ -22,7 +22,13 @@ class SuperAdminsController < ApplicationController
|
||||||
|
|
||||||
def generate_qr_code
|
def generate_qr_code
|
||||||
issuer = 'DSManager'
|
issuer = 'DSManager'
|
||||||
issuer += "-dev" if Rails.env.development?
|
|
||||||
|
if Rails.env.development?
|
||||||
|
issuer += " (local)"
|
||||||
|
elsif staging?
|
||||||
|
issuer += " (dev)"
|
||||||
|
end
|
||||||
|
|
||||||
label = "#{issuer}:#{current_super_admin.email}"
|
label = "#{issuer}:#{current_super_admin.email}"
|
||||||
RQRCode::QRCode.new(current_super_admin.otp_provisioning_uri(label, issuer: issuer))
|
RQRCode::QRCode.new(current_super_admin.otp_provisioning_uri(label, issuer: issuer))
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue