File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -21,17 +21,20 @@ Example code:
2121
2222``` php
2323use RobThree\Auth\TwoFactorAuth;
24+ use RobThree\Auth\Providers\Qr\QRServerProvider; // if using library's provider
2425use RobThree\Auth\Providers\Qr\BaconQrCodeProvider; // if using Bacon
2526use RobThree\Auth\Providers\Qr\EndroidQrCodeProvider; // if using Endroid
2627
28+ // using the default Qr Code provider from the library
29+ $tfa = new TwoFactorAuth(new QRServerProvider(), "Your app name");
2730// using Bacon
28- $tfa = new TwoFactorAuth(new BaconQrCodeProvider());
31+ $tfa = new TwoFactorAuth(new BaconQrCodeProvider(), "Your app name" );
2932// using Endroid
30- $tfa = new TwoFactorAuth(new EndroidQrCodeProvider());
33+ $tfa = new TwoFactorAuth(new EndroidQrCodeProvider(), "Your app name" );
3134// using a custom object implementing IQRCodeProvider interface
32- $tfa = new TwoFactorAuth(new MyQrCodeProvider());
35+ $tfa = new TwoFactorAuth(new MyQrCodeProvider(), "Your app name" );
3336// using named argument and a variable
34- $tfa = new TwoFactorAuth(qrcodeprovider: $qrGenerator);
37+ $tfa = new TwoFactorAuth(qrcodeprovider: $qrGenerator, issuer: "Your app name" );
3538```
3639
3740## 3. Shared secrets
You can’t perform that action at this time.
0 commit comments