RobThree / TwoFactorAuth

PHP library for Two Factor Authentication (TFA / 2FA)
MIT License
1.08k stars 128 forks source link

Fix issue #114 (Support for EndroidQR v5) #115

Closed Mattie112 closed 11 months ago

Mattie112 commented 12 months ago

The new version is using PHP ENUMs, added a check to make it compatible with v5.

Should also still work for v4 (and older)!

Tested with endroid/qr-code v4.8.5 and v5.0.2 with both versions I can generate a QR code.

            $qr_provider = new EndroidQrCodeProvider();
            $tfa = new TwoFactorAuth("xx", qrcodeprovider: $qr_provider);
            $qr = $tfa->getQRCodeImageAsDataUri("uid", $secret);