Closed andersespedalen closed 5 months ago
I have the same issue. Users complaint that they have to put the code several times every day.
@lahirulhr please reopen this. i am having the same issue.
probably related to the missing method at: https://github.com/Visanduma/nova-two-factor/blob/7d6932a18c522b2142dd2d0fe3ed40773d45d637/src/Http/Controller/TwoFactorController.php#L196
?
the middleware checks for the timestamp in the session, which is not present, so default is used:
public static function promptEnabled(Request $request)
{
$timeout = config('nova-two-factor.reauthorize_timeout', 5);
$promptFor = config('nova-two-factor.reauthorize_urls', []);
$hasUrl = $request->is($promptFor);
$lastAttempt = session()->get('2fa.prompt_at', now()->subMinutes($timeout + 1));
if ($lastAttempt->diffInMinutes(now()) > $timeout && $hasUrl) {
return true;
}
return false;
}
@mstaack Thanks for pointing out the exact issue. i'm going to apply a fix for it.
still having the issue, even on the latest release. need to verify on a daily basis...
will investigate soon
Issue #32 was closed, but this is still a problem. @dumithsalinda
I am forced to reauthorize quite often during the day, even though I have no reauthorize_urls defined and the reauthorize_timeout is set to 10080 which is a week