Registry / auth / pragmarx-google2fa

pragmarx-google2fa

JSON →
library9.0.0phppackagistunverified

A One Time Password Authentication package, compatible with Google Authenticator.

composer require pragmarx/google2fa
INSTALL
IMPORT
SIG · PRAGMARX-GOOGLE2FA
P
pragmarx-google2fa
authphpv9.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Google2FA
use PragmaRX\Google2FA\Google2FA;

Generate a secret key and QR code URL, then verify a one-time password

use PragmaRX\Google2FA\Google2FA; $google2fa = new Google2FA(); $secret = $google2fa->generateSecretKey(); $qrCodeUrl = $google2fa->getQRCodeUrl('MyApp', 'user@example.com', $secret); // Verify code $valid = $google2fa->verifyKey($secret, '123456');
Debug
Known issues
breakingRequires PHP 7.4+ and the paragonie/constant_time_encoding library
fix
Ensure your PHP version is 7.4 or higher and install required dependencies
affects: <9.0.0
Upgrade
Version history
9.0.0latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
36 hits · last 30 days
node
32
OpenAI (training)
1
Resources
pragmarx-google2fa — pip install pragmarx-google2fa · libregistry