diff --git a/src/MemoizedClientRepository.php b/src/MemoizedClientRepository.php index f54b93f..93ca25f 100644 --- a/src/MemoizedClientRepository.php +++ b/src/MemoizedClientRepository.php @@ -27,6 +27,17 @@ public function findForUser($clientId, $userId): ?Client : null; } + public function personalAccessClient(): Client + { + $client = parent::personalAccessClient(); + + if ($client !== null) { + $this->cache[$client->id] = $client; + } + + return $client; + } + public function update(Client $client, $name, $redirect): Client { $client = parent::update($client, $name, $redirect);