Laravel Passport oauth-private.key

storage/oauth-private.key does not exist

在使用Laravel passport 的时候出现下面问题

ERROR: Key path "file:///homesdf/new/storage/oauth-private.key" does not exist or is not readable {"exception":"[object] (LogicException(code: 0): Key path \"file:///homesdf/new/storage/oauth-private.key\" does not exist or is not readable at /home/newsfd/vendor/league/oauth2-server/src/CryptKey.php:45)

是因为在storage 文件夹下面没有oauth-private.key,oauth-public.key

解决办法:

在网站的根目录下面执行:

php artisan passport:install
passport:install

我们去看storage 文件夹下面

ls -al