Skip to content

Commit

Permalink
Add alt text for TOTP setup QR code
Browse files Browse the repository at this point in the history
Part of #32.
  • Loading branch information
lukegb committed Jul 29, 2017
1 parent a138ea4 commit c293eab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spongeauth/templates/twofa/setup/totp.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h4 class="panel-title">{% trans "Secure your account" %}</h4>
<ol>
<li>
<p>{% trans "Scan the QR code below to add Sponge to your authenticator." %}</p>
<p class="text-center"><img src="data:image/svg+xml;utf8,{{ qr_code_svg|urlencode:"" }}"></p>
<p class="text-center"><img src="data:image/svg+xml;utf8,{{ qr_code_svg|urlencode:"" }}" alt="TOTP Authenticator QR Code for secret {{ b32_secret }}"></p>
</li>
<li>
{% trans "Enter the 6 digit code that it displays to verify that your authenticator is set up correctly. You'll need to do this every time you log in from now on." %}
Expand Down
2 changes: 1 addition & 1 deletion spongeauth/twofa/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def setup_totp(request):
messages.success(request, _('Your authenticator has been added to your account.'))
return _generate_paper_codes_if_needed(request.user, reverse('twofa:list'))

return render(request, 'twofa/setup/totp.html', {'form': form, 'qr_code_svg': img_buf.getvalue()})
return render(request, 'twofa/setup/totp.html', {'form': form, 'qr_code_svg': img_buf.getvalue(), 'b32_secret': b32_secret})


@login_required
Expand Down

0 comments on commit c293eab

Please sign in to comment.