Call to undefined method Lcobucci\\JWT\\Token\\Plain::getClaim()
lloricode opened this issue · 3 comments
lloricode commented
package | version |
---|---|
php | 7.4.11 |
dusterio/lumen-passport | 0.3.1 |
laravel/passport | 10.1.0 |
lcobucci/jwt | 4.0.0 |
when updating to laravel/passport v10.1.0
:
Call to undefined method Lcobucci\\JWT\\Token\\Plain::getClaim()
notice it update also lcobucci/jwt
to ^4.0
https://github.com/lcobucci/jwt/releases/tag/4.0.0
our temporary fix is add this to project composer.json
"lcobucci/jwt": "^3.4"
since laravel passport allow this
"lcobucci/jwt": "^3.4|^4.0",
aldoetobex commented
Hi @lloricode, I encountered the same error. Thanks for your temporary fix solution
chris-doehring commented
Unfortunetly, the workaround does not work when you want to use php 8. I created #150 which will fix the issue.
AliRazaLilani commented
if anyone still getting this error use this $verifiedIdToken->claims()->get('sub')
instead of this $verifiedIdToken->getClaim('sub')