2fa qrcode fixes (#2407)

* 2fa qrcode fixes

- add light background to qr code when using dark theme
- show OTP secret code under qr code for manual entry on apps if required

fixes #2386
fixes #2389

* fix code formatting

* revert changes re visible code

This conflicts with an existing PR.

* i code pretty
This commit is contained in:
Hugh Rundle 2022-11-20 04:51:18 +11:00 committed by GitHub
parent bbd2dc75f8
commit 6baa58260a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -92,6 +92,10 @@ $family-secondary: $family-sans-serif;
color: $grey-light !important;
}
#qrcode svg {
background-color: #a6a6a6;
}
@import "../bookwyrm.scss";
@import "../vendor/icons.css";
@import "../vendor/shepherd.scss";

View file

@ -45,7 +45,7 @@
<p>{% trans "Scan the QR code with your authentication app and then enter the code from your app below to confirm your app is set up." %}</p>
<div class="columns">
<section class="column is-narrow">
<figure class="m-4">{{ qrcode | safe }}</figure>
<figure class="m-4" id="qrcode">{{ qrcode | safe }}</figure>
<div class="field">
<label class="label" for="id_otp">{% trans "Enter the code from your app:" %}</label>
{{ form.otp }}