[GH-ISSUE #133] Sometimes Google2FA::verifyKey fails #296

Closed
opened 2026-03-01 17:49:01 +03:00 by kerem · 1 comment
Owner

Originally created by @gabrielchiron on GitHub (Nov 27, 2019).
Original GitHub issue: https://github.com/antonioribeiro/google2fa/issues/133

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?

Originally created by @gabrielchiron on GitHub (Nov 27, 2019). Original GitHub issue: https://github.com/antonioribeiro/google2fa/issues/133 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?
kerem closed this issue 2026-03-01 17:49:01 +03:00
Author
Owner

@gabrielchiron commented on GitHub (Nov 27, 2019):

Wrong repository

<!-- gh-comment-id:559078643 --> @gabrielchiron commented on GitHub (Nov 27, 2019): Wrong repository
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/google2fa#296
No description provided.