PHPGangsta / GoogleAuthenticator

PHP class to generate and verify Google Authenticator 2-factor authentication
http://phpgangsta.de/4376
BSD 2-Clause "Simplified" License
2.26k stars 697 forks source link

Key not recognized #92

Open shantiwebsolution opened 3 years ago

shantiwebsolution commented 3 years ago

Code works perfectly. While I create QR Code and try to scan with Google authentication app I am getting Key is not recognized error. Kindly help

Here is my code

require 'vendor/autoload.php'; $username = 'jayesh_d'; $salt = $this->config->item('salt'); $ga = new PHPGangsta_GoogleAuthenticator(); $secret = $username.$salt; echo '<img src="'. $ga->getQRCodeGoogleUrl('', $secret).'" />';