问题
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;
回答1:
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.
回答2:
I'm deeply sorry for causing confusion or issues. Please check https://github.com/lcobucci/jwt/issues/550#issuecomment-733557709 for my full explanation on why this approach was taken and why it isn't considered a BC-break in my PoV.
来源:https://stackoverflow.com/questions/64999830/getting-exception-while-create-token-using-passport-laravel