Download the PHP package pragmarx/google2fa-qrcode without Composer
On this page you can find all versions of the php package pragmarx/google2fa-qrcode. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pragmarx/google2fa-qrcode
More information about pragmarx/google2fa-qrcode
Files in pragmarx/google2fa-qrcode
Package google2fa-qrcode
Short Description QR Code package for Google2FA
License MIT
Informations about the package google2fa-qrcode
Google2FA QRCode
QRCode For Google2FA
This is package is Goole2FA integrated with a QRCode generator, providing an easy way to plot QRCode for your two factor authentication. For documentation related to Google2FA, please check the documentation of the main package.
Requirements
- PHP 5.4+
Installing
Use Composer to install it:
Using It
Instantiate it directly
Generating QRCodes
The securer way of creating QRCode is to do it yourself or using a library. First you have to install the BaconQrCode package, as stated above, then you just have to generate the inline string using:
And use it in your blade template this way:
Show the QR Code to your user, via Google Apis
It's insecure to use it via Google Apis, so you have to enable it before using it.
And they should see and scan the QR code to their applications:
And to verify, you just have to:
Replacing the QRCode rendering service
If you want to use a different service, you just have to
Built-in QRCode rendering services
Beginning on version 2.0 the rendering service is optional, so you have to manually install one of those packages in order to generate QRCodes:
- BaconQrCode: renders PNG by default, but requires the Imagick PHP extension. You can configure it to use different backends, but you'll have to instantiate it yourself.
- chillerlan/php-qrcode: renders SVG by default and don't require the Imagick PHP extension, but can also generate other formats, which may require Imagick.
Using a diffent image backend
Tests
The package tests were written with PHPUnit.
Authors
License
Google2FAQRCode is licensed under the MIT License - see the LICENSE file for details.
Contributing
Pull requests and issues are more than welcome.