Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot refresh an expired token even if the token is within the allowed refresh time #2209

Open
vitorbizarra opened this issue Feb 2, 2023 · 2 comments

Comments

@vitorbizarra
Copy link

Subject of the issue

I can refresh a non-expired token normally, but when I try to refresh an expired token, I get a 401 response with the message "Unauthenticated", even if the token is within the allowed refresh time.

My JWT .env variables (I didn't put the JWT_SECRET in the printscreen but it's on the .env file):
imagem_2023-02-02_111036743

I saw other people with similar issues in the issues area but i cannot find any answer. Anyone have an idea how to resolve it?

Your environment

Q A
Bug? yes
New Feature? no
Framework Laravel
Framework version 9.47.0
Package version dev-develop
PHP version 8.1.2

Steps to reproduce

Generate a token and wait till it expires. When expired, try to refresh token.

Expected behaviour

Return the new token

Actual behaviour

Return an 401 Unauthorized response with the message: "Unauthenticated".

imagem_2023-02-02_110859717

@seankoole
Copy link

@vitorbizarra did you found the solution to this ?

@vitorbizarra
Copy link
Author

Hello, @seankoole! Unfortunately not yet. :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants