Compare commits

..

2 Commits

Author SHA1 Message Date
William Hall ecee1426cf 🔧 exclude problematic versions from automated tests 2026-01-05 10:54:39 +00:00
William Hall 515f3a9bb8 🔧 update workflows 2026-01-05 10:41:42 +00:00
2 changed files with 5 additions and 7 deletions
+4 -7
View File
@@ -21,20 +21,17 @@ Example code:
```php
use RobThree\Auth\TwoFactorAuth;
use RobThree\Auth\Providers\Qr\QRServerProvider; // if using library's provider
use RobThree\Auth\Providers\Qr\BaconQrCodeProvider; // if using Bacon
use RobThree\Auth\Providers\Qr\EndroidQrCodeProvider; // if using Endroid
// using the default Qr Code provider from the library
$tfa = new TwoFactorAuth(new QRServerProvider(), "Your app name");
// using Bacon
$tfa = new TwoFactorAuth(new BaconQrCodeProvider(), "Your app name");
$tfa = new TwoFactorAuth(new BaconQrCodeProvider());
// using Endroid
$tfa = new TwoFactorAuth(new EndroidQrCodeProvider(), "Your app name");
$tfa = new TwoFactorAuth(new EndroidQrCodeProvider());
// using a custom object implementing IQRCodeProvider interface
$tfa = new TwoFactorAuth(new MyQrCodeProvider(), "Your app name");
$tfa = new TwoFactorAuth(new MyQrCodeProvider());
// using named argument and a variable
$tfa = new TwoFactorAuth(qrcodeprovider: $qrGenerator, issuer: "Your app name");
$tfa = new TwoFactorAuth(qrcodeprovider: $qrGenerator);
```
## 3. Shared secrets
@@ -26,6 +26,7 @@ abstract class BaseHTTPQRCodeProvider implements IQRCodeProvider
throw new QRException(curl_error($curlhandle));
}
curl_close($curlhandle);
return $data;
}
}