janko / rodauth-rails

Rails integration for Rodauth authentication framework
https://github.com/jeremyevans/rodauth
MIT License
565 stars 40 forks source link

Black QR-Code during OTP setup #169

Closed gismoog closed 1 year ago

gismoog commented 1 year ago

I'am not able to display a QR-Code do complete OTP setup because I only get a fully black QR-Code.

When I remove

<rect width="456" height="456" x="0" y="0" fill="##fff"></rect>

in the HTML-Code Rodauth generated everything works fine.

rqrcode (2.1.2) rqrcode_core (1.2.0) rodauth (2.26.0) rodauth-i18n (0.5.1) rodauth-model (0.2.1) rodauth-rails (1.6.2)

<%= rodauth.otp_qr_code.html_safe %>:

Bildschirm­foto 2022-11-06 um 12 59 53
gismoog commented 1 year ago

Ups,

I just downgraded the rodauth gem from 2.26.0 to 2.25.0 and everything is working again.

The changelog.md of rodauth contains the following line:

I think this will cause the problem.

BTW: I use tailwind.css

janko commented 1 year ago

Interesting, I thought this change in Rodauth was intended precisely to prevent this from happening when using dark mode with Tailwind CSS. So, I would expect the QR code to be completely black on versions 2.25 and below (because it uses a transparent background), and to appear normal in versions 2.26 and above.

janko commented 1 year ago

You're right, this really was a regression in the latest Rodauth version. I opened https://github.com/jeremyevans/rodauth/pull/279 to fix it. I'm going to close this one, since it's not an issue with rodauth-rails.