问题描述
我希望你一切都好.我正在使用Oauth护照laravel,在以前的机器上可以正常工作,但是我必须切换机器.我的新机器具有php 8,而laravel项目是7.30.0版本,而lcobucci/jwt版本是3.3.3当我尝试在邮递员上点击注册路线时,出现以下错误
I hope you are doing fine. I was working on Oauth passport laravel, it was working fine on my previouse machine but i had to switch machines.My new machine has php 8 and my laravel project is of 7.30.0 version and my lcobucci/jwt version is 3.3.3. When i try to hit register route on postman i get the following error
Lcobucci \ JWT \ Signer \ InvalidKeyProvided:无法解析您的密钥,原因:在文件C:\ Users \ user \ Documents \ GitHub \ myproject \ vendor \ lcobucci \ jwt \ src \ Signer \ InvalidKeyProvided.php中在第17行
Lcobucci\JWT\Signer\InvalidKeyProvided: It was not possible to parse your key, reason: in file C:\Users\user\Documents\GitHub\myproject\vendor\lcobucci\jwt\src\Signer\InvalidKeyProvided.php on line 17
推荐答案
您可以在 https://packagist.org/packages/lcobucci/jwt#3.3.3 ,表明JWT软件包正式与PHP 8不兼容.您应该将其升级到兼容版本(至少v4),或者将您的PHP版本降级到v7
As you can see on https://packagist.org/packages/lcobucci/jwt#3.3.3, that JWT package is officially not compatible with PHP 8. You should upgrade it to a compatible version (at least v4), or downgrade your PHP version to v7
这篇关于错误,Lcobucci \ JWT \ Signer \ InvalidKey提供:无法解析您的密钥的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!