use a more descriptive name for TOTP QR code

fixes FOO-1518

test plan:
 * enable MFA on the root account
 * configure MFA for a user (profile page)
 * scan the QR code with Google Authenticator
 * the name for it should be "<account name> Canvas: <login id>"

Change-Id: Ib744082989b9eb6258abf5e705fea5968522af65
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/257096
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Zac Watson <zac@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
This commit is contained in:
Cody Cutrer 2021-01-20 17:20:56 -07:00
parent 28ca0085a2
commit 55c88f7d39
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ profile page and print out a set of back-up codes, in case your normal multi-fac
<% end %>
</div>
<div class="col-xs-4">
<% provisioning_uri = ROTP::TOTP.new(session[:pending_otp_secret_key]).provisioning_uri("Canvas") %>
<% provisioning_uri = ROTP::TOTP.new(session[:pending_otp_secret_key]).provisioning_uri("#{@domain_root_account.name} Canvas- #{@current_pseudonym.unique_id}") %>
<% qr_code = Barby::QrCode.new(provisioning_uri) %>
<div class="otp-qr-code">
<img src="data:image/png;base64,<%= Base64.encode64(qr_code.to_png(:xdim => 4)).strip %>">