PHPGangsta / GoogleAuthenticator

PHP class to generate and verify Google Authenticator 2-factor authentication
http://phpgangsta.de/4376
BSD 2-Clause "Simplified" License
2.23k stars 689 forks source link

Google Charts API is deprecated and not available since March 19, 2019 #62

Closed luxemate closed 5 years ago

luxemate commented 5 years ago

Google Charts API has a nice warning about that:

Warning: This API is deprecated and is scheduled to be turned off on March 14, 2019. Please use the actively maintained Google Charts API instead.

And returns 502 instead of qr-code: 2019-03-19_09-19

svoorn commented 5 years ago

Just replace line 112 with return "https://api.qrserver.com/v1/create-qr-code/?data=$urlencoded&size=${width}x${height}&ecc=$level";

PHPGangsta commented 5 years ago

Thanks, has been commited: 4f80232ee76e78eae9977236ee8c7fda7518322a

luxemate commented 5 years ago

Thanks! Would be great to also have a way to define your own URL for QR code generation (we backed off to our internal URL), to have a choice between open solutions or not rely on them altogether, as they work today and might not work tomorrow. But that's a different story. :)

PHPGangsta commented 5 years ago

Of cause you can generate your own QR code URL. Just use the secret (via createSecret()) and build your own URL. The built-in function is just a small help for convenience, but nobody is forced to use it 😄