GoogleAuthenticator
GoogleAuthenticator copied to clipboard
Question: How do i check the Code from the App Google Authenticator?
I got a code from the App. like 050 221. How do i check the Code if it is right?
`$authenticator = new PHPGangsta_GoogleAuthenticator();
$secret = '3JMZE4ASZRIISJRI'; //The users secret key $key= '183036' ; //The number generated by app.
$checkKey = $authenticator->verifyCode($secret, $key, 0);
if ($checkKey ) { echo 'Validated Succesfully';
} else { echo 'FAILED'; }`