From 765f4cff9137ee5f5e707c4afb6a5f2e1bc8fc8b Mon Sep 17 00:00:00 2001 From: Morteza Negahi Date: Thu, 14 Mar 2024 17:49:35 +0330 Subject: [PATCH] [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 --- src/ApiTokenCookieFactory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ApiTokenCookieFactory.php b/src/ApiTokenCookieFactory.php index ffed5d1e3..a99dfd9bf 100644 --- a/src/ApiTokenCookieFactory.php +++ b/src/ApiTokenCookieFactory.php @@ -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(),