diff --git a/api/components/OAuth2/Repositories/ClientRepository.php b/api/components/OAuth2/Repositories/ClientRepository.php index abc0d43..eeb4bc6 100644 --- a/api/components/OAuth2/Repositories/ClientRepository.php +++ b/api/components/OAuth2/Repositories/ClientRepository.php @@ -37,7 +37,12 @@ class ClientRepository implements ClientRepositoryInterface { } private function findModel(string $id): ?OauthClient { - return OauthClient::findOne(['id' => $id]); + $client = OauthClient::findOne(['id' => $id]); + if ($client === null || $client->type !== OauthClient::TYPE_APPLICATION) { + return null; + } + + return $client; } }