gpt4 book ai didi

php - 升级 laravel 5.1 - 5.4 时如何修复 'You must set the encryption key going forward to improve the security of this library' 错误

转载 作者:行者123 更新时间:2023-12-01 10:23:37 24 4
gpt4 key购买 nike

我正在将我的 laravel 5.1 升级到我们使用的 5.5 https://github.com/lucadegasperi/oauth2-server-laravel与密码授予。

将所有内容更新为 laravel 5.3 和 laravel Passport 1.0.x。但是在移动到 laravel 5.4 并将 Passport 升级到版本 2.0.x 之后。我的 OAuth 中断了消息

"You must set the encryption key going forward to improve the security of this library - see this page for more information https://oauth2.thephpleague.com/v5-security-improvements/","file":"/home/vagrant/Code/api/vendor/league/oauth2-server/src/AuthorizationServer.php","line":142

最佳答案

问题是因为当前的 passport 版本 2.0 安装了更高版本的 php league 的 oauth-server 2.0,这需要设置额外的安全参数,如下面的实现所示

新护照版本> 2 (3,4,5) 实现了这个 https://github.com/laravel/passport/blob/5.0/src/PassportServiceProvider.php#L203

对比版本 2

https://github.com/laravel/passport/blob/2.0/src/PassportServiceProvider.php#L204

最好继续使用 wards 上最新的 laravel passport version 3 来解决这个问题。我可以确认。

关于php - 升级 laravel 5.1 - 5.4 时如何修复 'You must set the encryption key going forward to improve the security of this library' 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48765311/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com