summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntonio Carlos Ribeiro <acr@antoniocarlosribeiro.com>2017-07-06 10:58:39 -0300
committerAntonio Carlos Ribeiro <acr@antoniocarlosribeiro.com>2017-07-06 10:58:39 -0300
commit3c2a019ba6118660d8567696761a0268f9aa9bc6 (patch)
tree326ffb2c2460f8a7f7caf2d0a2f1438509805ed1
parente87a6435b5d6dcbde3e22538979acf9d3eb9c2c6 (diff)
downloadgoogle2fa-3c2a019ba6118660d8567696761a0268f9aa9bc6.zip
google2fa-3c2a019ba6118660d8567696761a0268f9aa9bc6.tar.gz
google2fa-3c2a019ba6118660d8567696761a0268f9aa9bc6.tar.bz2
Add info about qrcode libraries
-rw-r--r--readme.md21
1 files changed, 20 insertions, 1 deletions
diff --git a/readme.md b/readme.md
index fb3eae9..f67d853 100644
--- a/readme.md
+++ b/readme.md
@@ -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: