Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Using Gulp watch will result in JWT failure #62

Closed
thomasmktong opened this issue Aug 18, 2016 · 5 comments
Closed

Using Gulp watch will result in JWT failure #62

thomasmktong opened this issue Aug 18, 2016 · 5 comments

Comments

@thomasmktong
Copy link
Contributor

if we use php artisan serve the site will be hosted in localhost:8080 by default.

if we then use gulp watch the site will be browser-sync'ed to another port, e.g. localhost:3000, the change of host seems will result in JWT error for every put request

{"message":"Wrong number of segments","status_code":401}

Actions such as updating user profile, will fail, if we carry out the action in localhost:3000 but it is completely normal in localhost:8000. Login is okay in both 3000 and 8000.

Anyone having this issue? Please correct me if I am wrong. Thanks.

@silverbux
Copy link
Owner

i cant reproduce the error, i tried googling, and it always points me to google oauth, can you check if your google client id, google client and google redirect are correct.

also serve laravel using php artisan serve --host=0 command

@silverbux
Copy link
Owner

if issue still exists you could eliminate 3000 and go directly to 8000 its just browserSync doing proxy on localhost:8000, the only disadvantage you'll have is not having your browser refresh on every file change anyway.

also i'm thinking to remove browserSync it seems a little buggy on windows platform

@thomasmktong
Copy link
Contributor Author

thomasmktong commented Aug 31, 2016

Hi @silverbux ,

Thanks for your help. I do use 8000 on windows these days and it works fine.
I also tried to use mac to build your project today but I cannot go to 3000, it doesn't respond at all. 8000 and 3001 (the brower sync settings page) work fine. Have you experienced this issue? thanks.

screen shot 2016-08-31 at 12 06 18 pm

Thomas

@silverbux
Copy link
Owner

yeah i use mac too, i use php artisan serve --host=0 to serve laravel

@thomasmktong
Copy link
Contributor Author

Oh thanks! Everything works great on mac now after adding --host=0

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

No branches or pull requests

2 participants