Open robinvanderknaap opened 10 months ago
This would be great because the Google Chart API have started to throw an unexpected error since yesterday.
@hafiz-personal
FYI. After this pull request, I decided to change my strategy for rendering the QRCode. I'm rendering the QRCode in the browser instead of the backend. I still use this library for validating the tfa token in the backend.
This is the library I used for rendering the QR Code in the browser: https://github.com/soldair/node-qrcode.
@hafiz-personal
FYI. After this pull request, I decided to change my strategy for rendering the QRCode. I'm rendering the QRCode in the browser instead of the backend. I still use this library for validating the tfa token in the backend.
This is the library I used for rendering the QR Code in the browser: https://github.com/soldair/node-qrcode.
Thank you.
The Google Chart API has been deprecated since 2012 : https://developers.google.com/chart/image/. It is still working by the way, but nobody knows when the service will be shutdown.
I've replaced the Google Chart API with the QRCoder library, which uses .NET classes to draw the QRCode image instead of relying on an external API.
I also needed to add the SkiaSharp library to be able to resize the resulting images.
I've updated the project containing the tests to .NET 8. Due to behavioral differences when comparing strings as of .NET 5, I had to make a minor change to the Base32 decoder for the tests to succeed.