laravel - Laravel 护照:安装错误:不创建 oauth 公钥和私钥
问题描述
我Laravel
正在Vue.js
使用MongoDB
. 我在部署我的应用程序后遇到了一些问题Heroku
,因为laravel/passport
. 特别是当我想登录我的用户时。
当我尝试登录POST
请求时返回:(Error 500: Unable to read key
我的本地主机也有同样的错误)。
所以我在问这个问题之前尝试了很多事情,并按照laravel/passport
(https://laravel.com/docs/7.x/passport)的文档说明进行操作。事实上,除了这两个命令(显示相同的错误)之外,一切正常:
>php artisan passport:install
>php artisan passport:keys --force
这个错误是:
ErrorException
file_put_contents(/secret-keys/oauth\oauth-public.key): failed to open stream: No such file or directory
当然,这些命令不会在我的文件夹中创建我需要正确登录的密钥文件 ( oauth-private.key
& oauth-public.key
) 。storage
我试过这个,但它没有解决我的问题:
>composer install
>composer dump-autoload
>composer update --no-scripts
>composer update
>php artisan config:clear && php artisan cache:clear
我已经删除了我的vendor
文件夹和composer.lock
文件并运行composer install
了,但没有解决我的问题。
最后,我已将其添加到我的 composer.json 文件中:
"post-install-cmd": [
"php artisan clear-compiled",
"chmod -R 777 storage",
"php artisan passport:keys"
]
没有再次解决我的问题。
我错过了什么?谁能帮我 ?
谢谢
解决方案
推荐阅读
- java - 如何从Java中找到第一个字符的反向拆分字符串?
- java - 在 selenium 中使用 FindBy 时出错。错误信息空点异常
- nginx - 如果url包含特定单词,nginx如何重定向到wordpress文件夹
- node.js - 从 p12 node-forge 获取证书正文和私钥
- amazon-web-services - AWS API 网关 URL 返回 {"message":"Forbidden"}
- php - Dotenv 必须是 Dotenv\Loader 的一个实例
- java - 如何从 MongoDB 和 Cosmos DB 的值字段中获取可嵌入文档?
- .net - PowerShell Active Directory 是否调用 System.DirectoryServices.AccountManagement
- python - Python:搜索和替换 HTML 字符串中的所有 img 标签
- java - java.security.NoSuchAlgorithmException:提供者 SunJCE 不提供 DES/ECB/NoPadding