The official PHP SDK for QRAuth - secure QR code authentication and verification.
composer require qrauth/qrauth-phprequire_once 'vendor/autoload.php';
use QRAuth\QRAuth;
$qrauth = new QRAuth(
tenantId: 'your-tenant-id',
apiKey: 'your-api-key'
);
$qrCode = $qrauth->create(
destination: 'user@example.com',
label: 'Login Verification',
location: [
'lat' => 40.7128,
'lng' => -74.0060,
'radius' => 100
]
);
echo $qrCode['qrImageUrl']; // Display to user$result = $qrauth->verify(
token: $token,
scannerLat: 40.7128,
scannerLng: -74.0060
);
if ($result['verified']) {
echo "Verified by " . $result['issuer']['name'];
echo "Trust score: " . $result['trustScore'];
}Initialize the QRAuth client.
create(string $destination, string $label, ?array $location = null, ?array $metadata = null, ?int $expiresIn = null): array
Create a new QR code for authentication.
Verify a QR code token.
Revoke a QR code token.
List QR codes with optional filtering.
For detailed API documentation, visit docs.qrauth.io