I am trying to set up an OAuth server in Symfony using the FOSOAuthServerBundle
bundle. However, I am getting the following error:
Client not found.
404 Not Found - NotFoundHttpException
As far as I can see in the source code, it is looking for a client somewhere. (See code below)
How do I provide it with that information in the form? I've tried putting in a hidden client_id
field without any success.
$request = $this->getCurrentRequest();
$client = null;
if (null !== $request) {
if (null === $clientId = $request->get('client_id')) {
$form = $this->container->get('fos_oauth_server.authorize.form');
$formData = $request->get($form->getName(), array());
$clientId = isset($formData['client_id']) ? $formData['client_id'] : null;
}
$client = $this->container
->get('fos_oauth_server.client_manager')
->findClientByPublicId($clientId);
}
if (null === $client) {
throw new NotFoundHttpException('Client not found.');
}