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

Token didn't expire even after a day which is supposed to in one hour #1837

Open
Naveen95 opened this issue Jul 3, 2019 · 6 comments
Open
Labels

Comments

@Naveen95
Copy link

Naveen95 commented Jul 3, 2019

Your environment

Q A
Bug? yes
New Feature? no
Framework Laravel
Framework version 5.8
Package version 1.0.0
PHP version 7.3.1

Expected behaviour

The token must expire in one hour.

Actual behaviour

The token didn't expire even after a day. and still works fine. the cache driver is set to file.

@mfn
Copy link
Contributor

mfn commented Jul 3, 2019

How did you set the expiration? Did you set the ttl via config/jwt.php?

@Naveen95
Copy link
Author

Naveen95 commented Jul 3, 2019

@mfn Yes i did via config/jwt.php. still it is not working.

@mfn
Copy link
Contributor

mfn commented Jul 3, 2019

When you paste the token to https://jwt.io/ (the debugger), what does it say? Is the expire correct? Please paste the outcome here

@Naveen95
Copy link
Author

Naveen95 commented Jul 4, 2019

Yes i have set the time to expire as one min and the exp also denotes the same.
{
"iss": "http://127.0.0.1:8000/api/auth/login",
"iat": 1562217784,
"exp": 1562217844,
"nbf": 1562217784,
"jti": "85stFvYA1Frh3NKl",
"sub": 1,
"prv": "87e0af1ef9fd15812fdec97153a14e0b047546aa"
}

But the token works even after a day. Not sure what is causing the problem

@ash-jc-allen
Copy link

@Naveen95 I'm not sure if you're still having any problems with this. But I used to get similar issues with tokens due to time drift on my virtual machine. Usually resyncing the VMs time worked. I don't know if this will be at all useful?

@stale
Copy link

stale bot commented Dec 26, 2020

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.

@stale stale bot added the stale label Dec 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants