Open AmirrezaNasiri opened 6 years ago
I have the same issue with version 1 of this package I use lumen version 5.7 php version 7.1
The issue is still there however it's mostly happening on development environment. In production however, I'm not faced with it yet. @larabhdr Something to note is that in the development environment, trying to disable any extra requests like requests related to BrowserSync was useful to reduce the problem occurrences.
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Facing the same issue, It is working fine in production env but facing problem while testing it on local dev env... Have you guys found any solution or clue, on how to proceed with it further?
Authentication results in 401
Token Signature could not be verified.
randomlyWe're working on a project where back-end is being handled by
Laravel 5.6
usingjwt-auth
. On front-end, we useVue.js
andvue-auth
to handle authorization. The issue happens randomly so I couldn't find a way to trace it. It's explained in sections below.My environment
Here is my
.env
file (keys will be changed so there is no problem making them public):Here is my
jwt.php
config file:Steps to reproduce
The issue is unexpected and occurs randomly and I couldn't find a way to reproduce it manually.
Expected behaviour
Token must be verified just like other previous requests. Everything related to authentication is same as other requests.
Actual behaviour
Look at the request stack below:
Request starting with
paginate
has been accepted correctly but next request starting withlast_week
has been blocked by a 401 response tellingToken Signature could not be verified
. Here are the request and response of requests:Request which was verified correctly
Request headers:
Response headers:
Response body:
Request which could not be verified
Request headers:
Response headers:
Response body:
As you can see, there is no difference between
Authorization
headers, no token was refreshed and there is no new token in the verified response. Also I think there is no problem withJWT_SECRET
since the token is being correctly validated often. There is no problem in caching system. Note that the requests are verified somehow randomly so next time these requests may get verified and others not. If there is anything could help make the problem more clear, please let me know.