0

UPDATE

There is something wrong. After to run for first time php artisan passport:install the oauth-*.key are generated on storage dir. After logout of the bash and login again these disappear. Then, i run php artisan passport:keys to generate them again but after exit the bash these disappear again.

Im doing this from the app bash (heroku run bash --app NAME).


I deployed a Laravel 6 App on Heroku.

I'm facing a problem using Laravel Passport to login. I already check most of similar questions on google and tried everything but the problem still there. Login API responses with:

LogicException
Key path "file:///app/storage/oauth-private.key" does not exist or is not readable

After to deploy on Heroku i ran those commands:

php artisan migrate --seed
php artisan passport:install
php artisan passport:keys // Says: Encryption keys already exist. Use the --force option to overwrite them.

// After the first try fails, i ran php atrisan passport:keys --force 

I also verified on storage dir that 'oauth-private.key' and 'oauth-public.keys' files exists and set chmod 777 to storage dir.

Hope you can help me.

Ken Ramirez
  • 1
  • 1
  • 2
  • 1
    If this app is deployed, DO NOT SET 777 ON THE KEY FILES! Check the file path and make sure there is a file there, if not, check where those commands are supposed to place the file. – Alex Haslam Feb 13 '20 at 22:55
  • @AlexHaslam you're right, keys were there after install passport but later these disappear. I've update the thread. – Ken Ramirez Feb 14 '20 at 13:40

0 Answers0