Skip to content

Commit

Permalink
fix session timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonvarga committed Feb 25, 2025
1 parent 7f8ec82 commit ab4e538
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Http/Controllers/CP/SessionTimeoutController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ public function __invoke()
// remember me would have already been served a 403 error and wouldn't have got this far.
$lastActivity = session('last_activity', now()->timestamp);

return Carbon::createFromTimestamp($lastActivity, config('app.timezone'))
return abs((int) Carbon::createFromTimestamp($lastActivity, config('app.timezone'))
->addMinutes((int) config('session.lifetime'))
->diffInSeconds();
->diffInSeconds());
}
}

0 comments on commit ab4e538

Please sign in to comment.