Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
geniux300 opened this issue Jul 19, 2018 · 7 comments

Comments

@geniux300
Copy link

geniux300 commented Jul 19, 2018

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.

@nicolasflorth
Copy link

nicolasflorth commented Jul 19, 2018

@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

@moeen-basra
Copy link
Owner

moeen-basra commented Jul 22, 2018

@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.

@moeen-basra
Copy link
Owner

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

@bruxter
Copy link

bruxter commented Jul 28, 2018

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.

@moeen-basra
Copy link
Owner

are you using windows with wamp ?

@moeen-basra
Copy link
Owner

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

@moeen-basra
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants