Skip to content

Token could not be parsed from the request #30

@Messhias

Description

@Messhias

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or requesthelp wantedExtra attention is neededquestionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions