dusterio/lumen-passport

NotFoundHttpException

MikeAlbela opened this issue · 5 comments

Hi guys,
I followed every step on the instruction from installation to User model but when I tried to access it http://localhost:8000/oauth/token it is showing me error 404 NotFoundHttpException.
I am pretty sure I've done everything on the instruction but one thing I am not sure of is the registering the routes, what I did is put this "\Dusterio\LumenPassport\LumenPassport::routes($this->app);" in the boot() function in AuthServiceProvider.php file

You need to put this line in the AuthServiceProvider:

use Illuminate\Support\ServiceProvider;
public function boot()
{
        LumenPassport::routes($this->app->router);
}

Hello,
I already have that, here's my AuthServiceProvider but I still have the same error

image

image

Thank you

Did you uncomment/insert these lines in bootstrap/app.php?

$app->register(App\Providers\AuthServiceProvider::class);
$app->register(\Laravel\Passport\PassportServiceProvider::class);
$app->register(\Dusterio\LumenPassport\PassportServiceProvider::class);

Yes, I did uncomment those lines in bootstrap/app.php but still it's showing error 404 when I tried to access http://localhost:8000/oauth/token to generate a key.

Finally solved the issue. Seems like the instructions are bit incomplete if it's being followed by a newbie in lumen/laravel like me.
This link helped me to solved the issue: https://medium.com/@misteryomi/integrating-laravel-passport-in-your-lumen-project-with-example-1c2b8719c30