johnstyle / google-authenticator
PHP 5 Google Authenticator
Installs: 13 226
Dependents: 0
Suggesters: 0
Security: 0
Stars: 22
Watchers: 3
Forks: 2
Open Issues: 0
Requires
- php: >=5.4.0
- christian-riesen/base32: 1.2
README
Google Authenticator
##Usage
###Step 1 - Register application
$google = new GoogleAuthenticator(); // Register application echo $google->getQRCodeUrl('MyApplicationName'); // Save secret Key $secretKey = $google->getSecretKey();
###Step 2 - Verify Code
$google = new GoogleAuthenticator($secretKey); // User submit code $userSubmitCode = ''; // Verify Code if ($google->verifyCode($userSubmitCode)) { // OK }
##Demonstration Demonstration