File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 1010use Thecodework \TwoFactorAuthentication \Contracts \TwoFactorAuthenticationInterface ;
1111use Thecodework \TwoFactorAuthentication \Exceptions \TwoFactorAuthenticationExceptions ;
1212use Thecodework \TwoFactorAuthentication \TwoFactorAuthenticationServiceProvider ;
13+ use Endroid \QrCode \QrCode ;
1314
1415class 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 }
You can’t perform that action at this time.
0 commit comments