"message": "Key path \"file:///app/storage/oauth-private.key\" does not exist or is not readable" in Laravel 6
You do not mention your installation steps. Presume you did the following:
composer require laravel/passport
Register the service provider inside config/app.php
Laravel\Passport\PassportServiceProvider::class,
Run the migrations
php artisan migrate
Lastly generate the keys using
php artisan passport:install
Laravel PassPort uses oauth2 which uses an asymmetric encryption algorithm. So you have to generate the public and private keys.You just have to type this command in your Laravel project to generate these keys. They will be in the storage folder.
php artisan passport:keys
For more information, see the laravel document.Laravel Doc : https://laravel.com/docs/8.x/passport#password-grant-tokens
Another solution is to go to the .gitignore file and delete the ***
storage / *. Keys
*** linebefore pushing to github