0

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;

lagbox
  • 48,571
  • 8
  • 72
  • 83
Deepak saini
  • 4,100
  • 2
  • 17
  • 20

2 Answers2

4

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.

noyce21
  • 56
  • 1
  • 2
    Yeah, I had the same problem and temporarily have downgraded `lcobucci/jwt` package version from `3.4.0` to `3.3.3`. My exception stacktrace is available [here](https://stackoverflow.com/questions/65003024/laravel-passport-problem-replicating-claims-as-headers-is-deprecated-and-will) – Ali Motameni Nov 25 '20 at 11:02
  • Okay, Let me try this – Deepak saini Nov 25 '20 at 11:43
1

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.

Luís Cobucci
  • 270
  • 2
  • 2