diff options
author | Antonio Carlos Ribeiro <acr@antoniocarlosribeiro.com> | 2017-07-06 10:58:39 -0300 |
---|---|---|
committer | Antonio Carlos Ribeiro <acr@antoniocarlosribeiro.com> | 2017-07-06 10:58:39 -0300 |
commit | 3c2a019ba6118660d8567696761a0268f9aa9bc6 (patch) | |
tree | 326ffb2c2460f8a7f7caf2d0a2f1438509805ed1 | |
parent | e87a6435b5d6dcbde3e22538979acf9d3eb9c2c6 (diff) | |
download | google2fa-3c2a019ba6118660d8567696761a0268f9aa9bc6.zip google2fa-3c2a019ba6118660d8567696761a0268f9aa9bc6.tar.gz google2fa-3c2a019ba6118660d8567696761a0268f9aa9bc6.tar.bz2 |
Add info about qrcode libraries
-rw-r--r-- | readme.md | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -52,7 +52,7 @@ Generate a secret key for your user and save it: $user->google2fa_secret = $google2fa->generateSecretKey();
```
-Show the QR code to your user:
+Show the QR Code to your user:
```php
$google2fa_url = $google2fa->getQRCodeGoogleUrl(
@@ -78,6 +78,25 @@ $secret = $request->input('secret'); $valid = $google2fa->verifyKey($user->google2fa_secret, $secret);
```
+## QR Code Libraries
+
+This package suggests the use of Bacon/QRCode because it is known as a good library, but you can use it with any other package, for instance [Simple QrCode](https://www.simplesoftware.io/docs/simple-qrcode).
+
+Usually you'll need a 2FA URL, so you just have to use the URL generator:
+
+```php
+ $google2fa->getQRCodeUrl($companyName, $companyEmail, $secretKey)
+```
+
+Here's an example using Simple QrCode:
+
+```php
+<div class="visible-print text-center">
+ {!! QrCode::size(100)->generate($google2fa->getQRCodeUrl($companyName, $companyEmail, $secretKey)); !!}
+ <p>Scan me to return to the original page.</p>
+</div>
+```
+
## Server Time
It's really important that you keep your server time in sync with some NTP server, on Ubuntu you can add this to the crontab:
|