- if ($clientForm->isValid()) {
- $client->setAllowedGrantTypes(['token', 'authorization_code', 'password', 'refresh_token']);
+ if ($clientForm->isSubmitted() && $clientForm->isValid()) {
+ $client->setAllowedGrantTypes(['client_credentials', 'token', 'authorization_code', 'password', 'refresh_token']);