-
-
Notifications
You must be signed in to change notification settings - Fork 551
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Google Charts API discontinued – QR Code generation fails #4579
Comments
hi @amarildosertorio |
@amarildosertorio |
It doesn't use google chart api to generate the QR code but https://goqr.me/api/doc/create-qr-code/ |
Hello! My TeamPass is behind a firewall, and until now, there was only an outbound rule for the domains mentioned in the documentation, as well as a recent rule for the domain exposed in the test. Thank you for your response, and I would like to suggest updating the documentation and considering the use of an internal library to avoid relying on external agents. |
Hello |
Hello,
I'm experiencing an issue with QR code generation in TeamPass due to the deprecation of chart.googleapis.com. When attempting to generate a QR code for Google Authenticator, the following error occurs:
PHP Fatal error: Uncaught TypeError: RobThree\Auth\Providers\Qr\QRServerProvider::getQRCodeImage(): Return value must be of type string, false returned in /var/www/html/teampass/vendor/robthree/twofactorauth/lib/Providers/Qr/QRServerProvider.php:36 Stack trace: #0 /var/www/html/teampass/vendor/robthree/twofactorauth/lib/TwoFactorAuth.php(120): RobThree\Auth\Providers\Qr\QRServerProvider->getQRCodeImage() #1 /var/www/html/teampass/sources/identify.php(1611): RobThree\Auth\TwoFactorAuth->getQRCodeImageAsDataUri() #2 /var/www/html/teampass/sources/identify.php(2489): googleMFACheck() #3 /var/www/html/teampass/sources/identify.php(344): identifyDoMFAChecks() #4 /var/www/html/teampass/sources/identify.php(85): identifyUser() #5 {main} thrown in /var/www/html/teampass/vendor/robthree/twofactorauth/lib/Providers/Qr/QRServerProvider.php on line 36
Since chart.googleapis.com has been discontinued, this API call no longer works and returns a 404 Not Found error.
Possible Fix
A possible solution is to replace the URL with an alternative QR code generation API, such as QRServer:
return 'https://api.qrserver.com/v1/create-qr-code/?' . http_build_query($queryParameters);
Would it be possible to update the codebase with a new provider, or make the QR code provider configurable?
Thanks in advance!
The text was updated successfully, but these errors were encountered: