-
Notifications
You must be signed in to change notification settings - Fork 117
Description
Subject of the issue
Describe your issue here.
Your environment
| Q | A |
|---|---|
| Bug? | yes |
| New Feature? | maybe |
| Framework | Laravel / Lumen |
| Framework version | 8.x |
| Package version | current |
| PHP version | 8.x |
Steps to reproduce
Tell us how to reproduce this issue.
Expected behavior
Try to put something in the token header different from Bearer <token> and see the local.ERROR: Token could not be parsed from the request. {"exception":"[object] (JWTException(code: 0): Token could not be parsed from the request. at /jwt-auth/src/JWTGuard.php:419)
Actual behaviour
local.ERROR: Token could not be parsed from the request. {"exception":"[object] (JWTException(code: 0): Token could not be parsed from the request. at /jwt-auth/src/JWTGuard.php:419)
Propose change
I don't have an actual propose change, but this is could happen when we have a frontend environment in which the tokens is shared on the same localStorage, might be would be better we just remove the payload and return false or something instead throw an exception, or return it as a message with a response 401.