moeen-basra / laravel-react

Laravel 8 and React 17 boilerplate

Home Page:http://laravel-react.moeen.me/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

404: Client error: `POST http://localhost/oauth/token` resulted in a `404 Not Found`

geniux300 opened this issue · comments

Hello, first I want to thank you for the great project you have shared with the community. It is really useful.

After following all the steps, I get the following error when trying to login with a user already registered (default users or even new users created)

I'm using XAMPP 3.2.2 to run the project

I have spent several weeks trying to solve this problem, but unfortunately I have not made any progress. I have deleted the project several times and reinstalled everything from scratch, but the result is always the same and I do not know what could be the cause.
I have not modified any line of code so I do not understand why it fails
If you could help me solve this problem I would be grateful.

@geniux300 In your command line, check if your oauth/token exist with php artisan route:list
If it will confirm that it does not exist, then I suspect that you didn't installed correctly laravel/passport.
Be sure that you have Passport::routes(); in app\Providers\AuthServiceProvider.php. Is part of Passport installation and this is making this localhost/oauth/token route accessible

commented

@geniux300 make sure you api calls are landing on proper path. Make sure you are able to access your api on browser or http client using the following path

<baseUrl>/api/v1/articles/published

If not then the issue is with your local configuration of xampp.

commented

The laravel passport v5 is already there you just need to run

composer install && php artisan passport:install

Then copy the password client ID and SECRET to your .env file

I think the issue is with your .env file, screenshot above you provided to .env file check key

APP_URL=localhost

where as in your last comment you attached api response coming from url localhost:8000

set your

APP_URL=localhost:8000

I have the same problem. I've been with this for more than a month and I can not login. I get the same error that describes geniux3000

Does nobody know how to solve it? I think that if the author could upload a YouTube video of the entire installation and configuration process, it would solve all the problems we are having.

commented

are you using windows with wamp ?

commented

I will try this myself on windows and will let you know.

commented

I've tried these steps on windows and linux both its working perfectly fine for me. Do let me know if any of you still facing this problem.