Getting exception while create Token using passport Laravel

Everything is working fine till yesterday. But Today while login through api I am getting an exception while creating token. Exception is : Replicating claims as headers is deprecated and will removed from v4.0. Please manually set the header if you need it replicated.

I don't know where things go wrong. If you have any solution it will really appreciate it, Thanks.

code for creating token : $user->createToken('fullaccess')->accessToken;

2 answers

  • answered 2020-11-25 08:46 noyce21

    I too faced the same issue, a quick solution will be to downgrade the package lcobucci/jwt : 3.3 . It must have been upgraded to 3.4 during composer update which threw the deprecation warning.

  • answered 2020-11-25 13:04 Luís Cobucci

    I'm deeply sorry for causing confusion or issues. Please check for my full explanation on why this approach was taken and why it isn't considered a BC-break in my PoV.