corbosman / laravel-passport-claims

Add claims to Laravel Passport JWT Tokens
MIT License
82 stars 11 forks source link

__ToString Error #7

Closed cetdelosaltos closed 3 years ago

cetdelosaltos commented 3 years ago

After installing Claims and declare them I get the following error when doing a request: { "message": "Method CorBosman\Passport\AccessToken::__toString() must not throw an exception, caught ErrorException: Replicating claims as headers is deprecated and will removed from v4.0. Please manually set the header if you need it replicated.", "exception": "Symfony\Component\ErrorHandler\Error\FatalError", "file": "D:\webs\VOW\experimento\backend\vendor\league\oauth2-server\src\ResponseTypes\BearerTokenResponse.php", "line": 0, "trace": [] }

corbosman commented 3 years ago

There appears to be some breaking issue with laravel/oauth2 and lcobucci/jwt. Could you try forcing version 3.3.0 of lcobucci/jwt and see if that fixes that problem?

corbosman commented 3 years ago

You may even see this problem without my package btw, I see similar reports on Passport itself.

corbosman commented 3 years ago

I see there is a new passport version that fixes the issue with lcobucci/jwt, i will update my package to use this new version. Might take me a day or so to fully understand the changes.

corbosman commented 3 years ago

Ok, so the issue is that you probably installed passport version 10.1.0 or higher, which has new code that fixes problems that arose from a lcobucci/jwt change. So you can probably for now install 10.0.x of passport, or wait until I have updated a new version of my package that works with the new passport. Probably tomorrow.

corbosman commented 3 years ago

Hi, I released a version 2.0.0, if you use Passport 10.1.x or higher you should try that and see if it works.

cetdelosaltos commented 3 years ago

Sorry. Was busy some other projects. I'll install and let you know. THANKS!

cetdelosaltos commented 3 years ago

Worked like a charm... All is up and running