Skip to content

Commit 765f4cf

Browse files
authored
[Bugfix] - Cast session lifetime to int (#1727)
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
1 parent c3aa8fc commit 765f4cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ApiTokenCookieFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function make($userId, $csrfToken)
4848
{
4949
$config = $this->config->get('session');
5050

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

5353
return new Cookie(
5454
Passport::cookie(),

0 commit comments

Comments
 (0)