Heroku Laravel 500(内部服务器错误)oauth-public.key 不存在

Heroku Laravel 500 (Internal Server Error) oauth-public.key does not exist

OAUTH Public Key is Here

oauth-public.key is exist

我在 Heroku 上使用 Laravel、Vue、RESTful API 上传了一个问题板。 当我登录并添加问题时,我收到一个名为 500(内部服务器错误)的消息 "Key path \"file:///app/storage/oauth-public.key\" does not exist or is not readable".

Github: https://github.com/2020software/Sample-Vuedev

Heroku 问题板:https://samplevueqa.herokuapp.com/

登录ID:文本@example.com 登录密码:密码

谢谢解决了同样问题的大佬们!

  1. 确认文件确实不存在,而不仅仅是权限不正确
  2. 确认它也不存在于 app/storage/app 中。我遇到过这样的情况,Passport 用于创建新密钥的默认位置与 Auth 中间件所在的位置不完全匹配。如果需要,您可以在 config/filesystems.php 中解决此问题。
  3. 确保 运行 php artisan passport:keys

我运行nedheroku ps:exec -a your_app_name下一个运行php artisan passport:keys我解决了!!