A free open source IT asset/license management system
OAuth Client Table Changes (Optional) from https://github.com/laravel/passport/blob/13.x/UPGRADE.md#oauth-client-table-changes-optional
Joël Pittet0508d7558e98
diff --git a/app/Http/Controllers/Api/ProfileController.php b/app/Http/Controllers/Api/ProfileController.phpindex 7648dd5ad8..8227c64ba3 100644--- a/app/Http/Controllers/Api/ProfileController.php+++ b/app/Http/Controllers/Api/ProfileController.php@@ -166,7 +166,17 @@ class ProfileController extends Controller$tokens = $this->tokenRepository->forUser(auth()->user()->getAuthIdentifier());$token_values = $tokens->load('client')->filter(function ($token) {- return $token->client->personal_access_client && ! $token->revoked;+ if ($token->revoked || ! $token->client) {+ return false;+ }++ $client = $token->client;++ if (method_exists($client, 'hasGrantType')) {+ return $client->hasGrantType('personal_access');+ }++ return in_array('personal_access', (array) ($client->grant_types ?? []), true);})->values();return response()->json(Helper::formatStandardApiResponse('success', $token_values, null));