GoogleAuthenticator icon indicating copy to clipboard operation
GoogleAuthenticator copied to clipboard

Google Auth app and system generated codes are different

Open rnkhouse opened this issue 7 years ago • 2 comments

I entered secret in google authenticator app. It generates random code in every few seconds. But, when I match with my code it's different.

$this->load->library('GoogleAuthenticator');
$oneCode = $this->googleauthenticator->getCode($secret);

$oneCode is different than I see in google app.

rnkhouse avatar Sep 14 '18 15:09 rnkhouse

Most often it's a time problem, so the clock is not synchronized between the mobile phone and the server. Please check if both systems have the same time, then they should generate the same code (with the same secret used).

PHPGangsta avatar Sep 14 '18 15:09 PHPGangsta

that is a problem indid. When the secret is long(maybe morethan 16length),The code is different from google app.

zxyaust avatar Dec 01 '21 02:12 zxyaust