Support the ongoing development of Laravel.io →
Laravel Passport Authorization
Last updated 9 hours ago.
0

I found the issue: the JWT token builder was changed to be immutable, which is breaking change introduced in lcobucci/jwt 5.0.0. The fix is to change all instances to the $builder to ensure the returned $builder is assigned to the original $builder variable whenever a builder method is called. IMO this is a bad change: immutability is desirable in most cases for sure, but the builder pattern is specifically about mutating a container for subsequent object construction.

Here is the PR for the change:

0
Solution selected by @chrisworman

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.