replaced bacon/bacon-qr-code with chillerlan/php-qrcode

removed imagick dependency

Signed-off-by: Max Kovalenko <mxss1998@yandex.ru>
This commit is contained in:
Max Kovalenko 2019-06-26 09:14:42 +03:00
parent bb2ab92d22
commit 87281f905a
No known key found for this signature in database
GPG Key ID: E7181A043AD0F379
3 changed files with 669 additions and 381 deletions

View File

@ -30,7 +30,6 @@
},
"require": {
"php": "^7.1.3",
"ext-imagick": "*",
"ext-mbstring": "*",
"ext-openssl": "*",
"ext-xml": "*",
@ -40,8 +39,8 @@
"alt-three/twitter": "^3.1",
"alt-three/validator": "^4.1",
"aws/aws-sdk-php": "^3.7",
"bacon/bacon-qr-code": "^2.0",
"barryvdh/laravel-cors": "^0.11.0",
"chillerlan/php-qrcode": "^2.0",
"doctrine/dbal": "2.9.*",
"fideloper/proxy": "^4.0",
"graham-campbell/binput": "^6.0",

1036
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -59,17 +59,8 @@
$currentUser->email,
$currentUser->google_2fa_secret
);
$writer = new \BaconQrCode\Writer(
new \BaconQrCode\Renderer\ImageRenderer(
new \BaconQrCode\Renderer\RendererStyle\RendererStyle(200),
new \BaconQrCode\Renderer\Image\ImagickImageBackEnd()
)
);
$qrcode_image = base64_encode($writer->writeString($google2fa_url));
?>
<img src="data:image/png;base64, {{ $qrcode_image }}" alt="qr code" class="img-responsive"/>
<img width="200" height="200" src="{{(new \chillerlan\QRCode\QRCode())->render($google2fa_url)}}" alt="qr code"/>
<span class='help-block'>{!! trans('forms.user.2fa.help') !!}</span>
</div>
@endif