Boopathi D
Boopathi D

Reputation: 377

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.

Upvotes: 0

Views: 1038

Answers (1)

Eudes Dohou
Eudes Dohou

Reputation: 1

Check the guard on the middleware that control your route or the resource you are trying to access.

Upvotes: 0

Related Questions