Registry / auth / robthree-twofactorauth

robthree-twofactorauth

JSON →
library3.0.3phppackagistunverified

Two Factor Authentication

composer require robthree/twofactorauth
INSTALL
IMPORT
SIG · ROBTHREE-TWOFACTOR
R
robthree-twofactorauth
authphpv3.0.3
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.

TwoFactorAuth
use RobThree\TwoFactorAuth\TwoFactorAuth;

Generate and verify TOTP-based two-factor authentication codes

use RobThree\TwoFactorAuth\TwoFactorAuth; $tfa = new TwoFactorAuth('MyApp'); $secret = $tfa->createSecret(); $qrCodeUrl = $tfa->getQRCodeImageAsDataUri('user@example.com', $secret); $isValid = $tfa->verifyCode($secret, '123456');
Debug
Known issues
gotchaGotcha: The library requires the 'imagick' or 'gd' extension for QR code generation.
fix
Install either php-imagick or php-gd extension, or use a custom QR code provider.
affects: *
Upgrade
Version history
3.0.3latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
30 hits · last 30 days
node
18
OpenAI (training)
1
Resources
robthree-twofactorauth — pip install robthree-twofactorauth · libregistry