I tried a vue-lumen-tutorial with laravel-passport. All works fine for me except the LoginController (login by user and password). I think its not a problem of the tutorial code, its more a server or laravel/lumen configuration problem. But i am not sure. The code runs remote on a linux machine (18.04), apache server with Lumen (5.8.12) (Laravel Components 5.8.*) and with Passport. The api endpoints are available but the /login endpoint gives a 404 Not found.
I found here some questions/answers concerning the index.php of lumen or .htaccess file. Just installed Lumen and got NotFoundHttpException . But it doesn't help me.
I am testing with Postman:
GET to https://domain/api/companies/ works fine,
POST to https://domain/api/oauth/token works fine, but
POST to https://domain/api/login gives a 404 Not found.
The route /login is ok.
...
return app()->version(); only for testing gives a request but i need the $tokenRequest:
...
return app()->dispatch($tokenRequest); => 404 Not found
...
error message:
(1/1) NotFoundHttpException
in RoutesRequests.php line 229
...
protected function handleDispatcherResponse($routeInfo)
{
switch ($routeInfo[0]) {
case Dispatcher::NOT_FOUND:
throw new NotFoundHttpException; <== 229
case Dispatcher::METHOD_NOT_ALLOWED:
throw new MethodNotAllowedHttpException($routeInfo[1]);
case Dispatcher::FOUND:
return $this->handleFoundRoute($routeInfo);
}
}
...
Maybe a proxy issue between /oauth/token and /login? What can i do?
LoginController here in row 45: https://github.com/aibim/vue-lumen-tutorial/blob/master/app/Http/Controllers/LoginController.php