Merge pull request #5745 from betagouv/totp-change-label

add specific totp label for dev env
This commit is contained in:
Paul Chavard 2020-11-17 17:16:14 +01:00 committed by GitHub
commit daa4cd0280
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,6 +22,7 @@ class SuperAdminsController < ApplicationController
def generate_qr_code
issuer = 'DSManager'
issuer += "-dev" if Rails.env.development?
label = "#{issuer}:#{current_super_admin.email}"
RQRCode::QRCode.new(current_super_admin.otp_provisioning_uri(label, issuer: issuer))
end