[GH-ISSUE #157] Valid is always false #537

Closed
opened 2026-03-14 12:08:53 +03:00 by kerem · 0 comments
Owner

Originally created by @sidclaynt on GitHub (Jun 24, 2020).
Original GitHub issue: https://github.com/antonioribeiro/google2fa/issues/157

i'm trying to enable 2fa but i get $valid as false all the time. what is missing?

`$google2FA = new Google2FA();
$request->verifyCode = "VFRXCICGWNUBMBHU";
//dd($google2FA);
$secret = $request->verifyCode;

$valid = $google2FA->verifyKey($user->passwordSecurity->google2fa_secret, $secret);

` echo $valid; //false

Originally created by @sidclaynt on GitHub (Jun 24, 2020). Original GitHub issue: https://github.com/antonioribeiro/google2fa/issues/157 i'm trying to enable 2fa but i get $valid as false all the time. what is missing? `$google2FA = new Google2FA(); $request->verifyCode = "VFRXCICGWNUBMBHU"; //dd($google2FA); $secret = $request->verifyCode; $valid = $google2FA->verifyKey($user->passwordSecurity->google2fa_secret, $secret); ` echo $valid; //false
kerem closed this issue 2026-03-14 12:08:58 +03:00
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#537
No description provided.