Open RaulCorreia opened 5 years ago
@RaulCorreia Have you updated the token expiry (ttl) within your config>jwt.php file?
@RaulCorreia Have you updated the token expiry (ttl) within your config>jwt.php file?
Yes, I put it for 4 days to expire, and I order to update every 2 days
no one has an idea? i still have this problem
As you're calling the auth('api')
method, the existing payload gets validated before reaching the next statement. To let the user refresh their tokens, you must define JWT_REFRESH_TTL
value higher than the JWT_TTL
. Otherwise, it won't work.
When refreshing the token, the following code gets executed, and the refresh ttl is set by the abstract service provider. The processing order is below
So you must have to set the JWT_REFRESH_TTL
higher than the JWT_TTL
.
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.
Subject of the issue
I made my class exactly the same as the documentation, but to check if this need to update the token I do this:
the token expiration time is 4 days and when it is 2 days to expire I send a message to the client to refresh the token, the client calls the refresh function that returns the following:
But I get the following error Token has expired and can no longer be refreshed
I just followed the documentation, what should I do or what am I doing wrong?
Your environment
Steps to reproduce
After the connection, check if the token has already passed the validity stipulated by me, if you spend 2 days of the total of 4 days send a flag informing the client to give refresh in the token. The client calls the api refresh method
Expected behaviour
The token should be updated
Actual behaviour
an exception is fired Token has expired and can no longer be refreshed