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

Transparent QR Image generate #83

Open venkatasiva-nihon opened 3 years ago

venkatasiva-nihon commented 3 years ago

Can you please help me, how to create Transparent background for QR code.

lipflip commented 3 years ago

Can you please help me, how to create Transparent background for QR code.

The lib uses the api https://api.qrserver.com/v1/create-qr-code/?data= to generate the qr-code, you can find documentation here: goqr.me/api/doc/create-qr-code/, but I don't see an option to make it transparent.... what you can do is, searching for another api that does support transparent background to generate the qr-codes. You can change it then in the function getQRCodeGoogleUrl in the GoogleAuthenticator.php file.