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); }