'Laravel JWT auth token generated using custom claims getting 401 unauthenicate
Previously I generated the auth token based on the user credentials and it was worked fine.
I need to generate the token for guest users in which I did not have the credentials.
So I followed token generation using custom claims in JWT. Using this link I implemented.
When I try to access the apis using the custom claims token I am getting 401 unauthorized error.
I am using the previous auth system in which token is generated using the user credentials and also I need the custom claims token also to work.
Any help would be appreciated.
Solution 1:[1]
Check the guard on the middleware that control your route or the resource you are trying to access.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Eudes Dohou |
