Skip to content

Commit

Permalink
[Bugfix] - Cast session lifetime to int (#1727)
Browse files Browse the repository at this point in the history
Laravel 11 with Passport has error cause Carbon needs int|float but the config passes as string.

this is the error https://flareapp.io/share/NPLWwVQm#context-request-browser
  • Loading branch information
kindslayer authored Mar 14, 2024
1 parent c3aa8fc commit 765f4cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ApiTokenCookieFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function make($userId, $csrfToken)
{
$config = $this->config->get('session');

$expiration = Carbon::now()->addMinutes($config['lifetime']);
$expiration = Carbon::now()->addMinutes((int) $config['lifetime']);

return new Cookie(
Passport::cookie(),
Expand Down

0 comments on commit 765f4cf

Please sign in to comment.