voten-co / voten

The code that powers voten.co
https://voten.co
Apache License 2.0
1.26k stars 231 forks source link

401 Unauthorized Errors #344

Closed trchristensen closed 5 years ago

trchristensen commented 6 years ago

The site is set up on my local machine. I'm using Valet. Followed the installation commands and configured the .env. Can you help me figure this out? Thanks.

screen shot 2018-09-15 at 5 49 20 am
saleh-old commented 6 years ago

Have you followed the instructions for Laravel Passport as well?

LEVATHIAN commented 6 years ago

Have you followed the instructions for Laravel Passport as well?

I'm having the same issue and i have not found any Passport instructions you are talking about, please link them?

Thank you.

saleh-old commented 6 years ago

@LEVATHIAN

php artisan passport:install
LEVATHIAN commented 6 years ago
php artisan passport:install

Still getting the same issue

amiller911 commented 6 years ago
php artisan passport:install

Still getting the same issue

sullyfischer dont help fix problem.

saleh-old commented 6 years ago

@amiller911 what?!

saleh-old commented 6 years ago

@LEVATHIAN please look it up as a "Laravel Passport" issue on the net

LEVATHIAN commented 6 years ago

@LEVATHIAN please look it up as a "Laravel Passport" issue on the net

I have been trying to fix the problem for 2 weeks with no results, i looked up all possible solutions.

The request has not been applied because it lacks valid authentication for the targeted resource.

Fyris commented 6 years ago

Having the same issue, did try all the commands listed above and in the installation instructions.

metellius commented 6 years ago

Looks like this is the issue: https://github.com/laravel/passport/issues/795 TokenGuard.php in passport expects jwt token to be serialized, but laravel has serialize set to false by default, so there's an exception thrown from unserialize.

BoKKeR commented 6 years ago

Somehow I still can't figure out how to fix this. Any hints?

LEVATHIAN commented 6 years ago

Somehow I still can't figure out how to fix this. Any hints?

Upgrade to Passport 7.0 and Laravel 5.7.x.

BoKKeR commented 6 years ago

Thanks it worked, but in the process I had to update other packages. I guess this should be updated in the composer.json file

This is what I used:

"laravel/framework": "5.7.*",
"laravel/passport": "^7.0",
"pbmedia/laravel-ffmpeg": "^3.0.0",
"php-ffmpeg/php-ffmpeg": "dev-master#c11b79ab5b0174aa1a56c54c67491169e78a4c17",
tott commented 6 years ago
"laravel/framework": "5.7.*",
"laravel/passport": "^7.0",
"pbmedia/laravel-ffmpeg": "^3.0.0",
"php-ffmpeg/php-ffmpeg": "dev-master#c11b79ab5b0174aa1a56c54c67491169e78a4c17",

This worked perfectly for me! Thanks @BoKKeR