From 87e41390036ec738bfc6c9f0d10619c398c5a6bb Mon Sep 17 00:00:00 2001 From: "Ahmed M. Ammar" Date: Wed, 24 Jul 2024 14:37:47 +0300 Subject: [PATCH] hotfix(partners): Fix get user from cache --- src/Http/OauthMiddleware.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http/OauthMiddleware.php b/src/Http/OauthMiddleware.php index 501fb41..d8d4518 100644 --- a/src/Http/OauthMiddleware.php +++ b/src/Http/OauthMiddleware.php @@ -50,7 +50,7 @@ public function handle($request, Closure $next, string $scope = null) $exception_at = now()->diffInSeconds($this->user->getExpiredAt()); - Cache::put($cacheKey, $this->user->toArray(), now()->addSeconds($exception_at)); + Cache::put($cacheKey, ['data' => $this->user->toArray()], now()->addSeconds($exception_at)); return $this->nextRequest($next, $request); }