antonioribeiro / google2fa

A One Time Password Authentication package, compatible with Google Authenticator.
MIT License
1.83k stars 199 forks source link

Sometimes Google2FA::verifyKey fails #133

Closed gabrielchiron closed 4 years ago

gabrielchiron commented 4 years ago

Hi!

I have this code in my controller:

$google = Google2FA::verifyKey($user->google2fa, $request->one_time_password, 24);

24 is the $window $request->one_time_password is the code than user have in the app.

Everything works well. But sometimes verifyKey returns a false causing my users to have to reset the code many times. Sometimes with a reset it works but sometimes you have to do a lot.

Now i reset and test 55 times the code and all time return false :(

Any solution?

gabrielchiron commented 4 years ago

Wrong repository