简体   繁体   中英

Error creating resource: [message] fopen(https://localhost:80/oauth/token): failed to open stream: Connection refused

I have to develop features for a new laravel app and when trying to run it locally after cloning it from the get repository, I can't get past the login window. My identifiers are refused and I get a 500 internal server error and this trace.

  • Error creating resource: [message] fopen(https://localhost:80/oauth/token): failed to open stream: Connection refused [file] /mnt/c/code/appname/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php [line] 324

I have tried getting the php.ini file from someone who has the app working locally and I have tried the usual troubleshooting commands (composer install; composer upgrade; php artisan cache:clear; php artisan route:clear; php artisan config:clear; php artisan view:clear)

The problem had to do with Laravel Passport.

I was missing the variables ACCESS_TOKEN_CLIENT_ID et ACCESS_TOKEN_CLIENT_SECRET in my .env file that were created during development by running php artisan passport:install and that correspond to the oauth-private.key and oauth-public.key file that are created when running that same command.

Bottom line is always make sure you have the same relevant values in your .env file as your colleagues when you join a project.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM