Skip to content

Commit 33d1f97

Browse files
Depreciated GoogleChart, replace by Endroid-Qrcode
1 parent 51e53ef commit 33d1f97

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Http/Controllers/TwoFactorAuthenticationController.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Thecodework\TwoFactorAuthentication\Contracts\TwoFactorAuthenticationInterface;
1111
use Thecodework\TwoFactorAuthentication\Exceptions\TwoFactorAuthenticationExceptions;
1212
use Thecodework\TwoFactorAuthentication\TwoFactorAuthenticationServiceProvider;
13+
use Endroid\QrCode\QrCode;
1314

1415
class TwoFactorAuthenticationController extends Controller implements TwoFactorAuthenticationInterface
1516
{
@@ -56,7 +57,10 @@ public function setupTwoFactorAuthentication(Request $request)
5657
);
5758
$totp->setLabel(config('2fa-config.account_name'));
5859
$this->updateUserWithProvisionedUri($totp->getProvisioningUri());
59-
$barcode = $totp->getQrCodeUri();
60+
61+
$qrCode = new QrCode($totp->getProvisioningUri());
62+
$barcode = $qrCode->writeDataUri();
63+
6064
if ($request->ajax()) {
6165
return $barcode;
6266
}

0 commit comments

Comments
 (0)